Hi all.
I'm relatively new to access and not a programmer.
I have a database of forest pest species, with a main "Search" form that operates quite nicely as a dashboard for the whole database (there's a separate data entry form that works well as well).
On the main search form, I'd like to have certain controls visible/invisible depending on values of other fields. Two cases in particular are:
1) make a Label visible only if a Checkbox is checked. (in the attached screenshot, I'd like to get the "Invasive" label to disappear if the checkbox next to it is not checked (would even be nice to have the checkbox itself disappear)). Remember - this is just search form that's not editable, so the checkbox will still be visible on my data entry form.
2) make a text box ("Order") invisible if value in a separate text box ("Pest Category") = "Pathogen". I tried to accomplish this one using the following code in the After Update for the "Pest Category" text box:
Private Sub Text67_AfterUpdate()
If Me.Text67 = "Pathogen" Then
Me.Text138.Visible = False
Else
Me.Text138.Visible = True
End Sub
It does nothing...
again, I'm not a programmer.
I appreciate any feedback! Also, if anyone can recommend a good beginner guide to MS Access coding (VBA or SQL) that would be great!
Cheers.
Justin
I'm relatively new to access and not a programmer.
I have a database of forest pest species, with a main "Search" form that operates quite nicely as a dashboard for the whole database (there's a separate data entry form that works well as well).
On the main search form, I'd like to have certain controls visible/invisible depending on values of other fields. Two cases in particular are:
1) make a Label visible only if a Checkbox is checked. (in the attached screenshot, I'd like to get the "Invasive" label to disappear if the checkbox next to it is not checked (would even be nice to have the checkbox itself disappear)). Remember - this is just search form that's not editable, so the checkbox will still be visible on my data entry form.
2) make a text box ("Order") invisible if value in a separate text box ("Pest Category") = "Pathogen". I tried to accomplish this one using the following code in the After Update for the "Pest Category" text box:
Private Sub Text67_AfterUpdate()
If Me.Text67 = "Pathogen" Then
Me.Text138.Visible = False
Else
Me.Text138.Visible = True
End Sub
It does nothing...

I appreciate any feedback! Also, if anyone can recommend a good beginner guide to MS Access coding (VBA or SQL) that would be great!
Cheers.
Justin
Last edited: