Combo Box to Fill in fileds with N/A

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a combo box (Name= Combo482) on my form with a Control Source to
ComplainantAnonymous. You can pick 'Yes' or 'No' from the drop down
menu.

If someone selects 'Yes', I want the following Text Fields ( Name,
Address, Phone Number) to say "N/A"

Can anyone help?
 
I have a combo box (Name= Combo482) on my form with a Control Source to
ComplainantAnonymous. You can pick 'Yes' or 'No' from the drop down
menu.

Any chance you could (for your own sake, later) rename this combo to
something meaningful?
If someone selects 'Yes', I want the following Text Fields ( Name,
Address, Phone Number) to say "N/A"

Open the form in design view. Select Combo482 (or the renamed combo).
View its Properties; on the Event tab select the AfterUpdate event and
click the ... icon by it. Choose "Code Builder". Access will open the
VBA editor with the Sub and End Sub line filled in. Edit it to:

Private Sub Combo482_AfterUpdate()
If Me!Combo482 = "Yes" Then
Me![Name] = "N/A"
Me![Address] = "N/A"
Me![Phone Number] = "N/A"
End If
End Sub

John W. Vinson[MVP]
 
Back
Top