Question : Fill Text Boxes with Text when Another Text Box equals a Specific Value

Keep Getting This Error.
You cant reference a property of method for a control unless the control has the focus

what do i need to do?

Private Sub Text74_AfterUpdate()
    If Me.Text74.Text = "Corn Head" Then
        Me.txtFuel.Text = "N/A"
        Me.txtEngine.Text = "N/A"
        Me.txtFTires.Text = "N/A"
        Me.txtRTires.Text = "N/A"
        Me.txtDuals.Text = "N/A"
    End If
End Sub

Answer : Fill Text Boxes with Text when Another Text Box equals a Specific Value

Try it as:
Private Sub Text74_AfterUpdate()
    If Me.Text74.Text = "Corn Head" Then
        Me.txtFuel.Value = "N/A"
        Me.txtEngine.Value = "N/A"
        Me.txtFTires.Value = "N/A"
        Me.txtRTires.Value = "N/A"
        Me.txtDuals.Value = "N/A"
    End If
End Sub
Random Solutions  
 
programming4us programming4us