Not Sure What Im Looking ForUpload ImagesLink Glenn Kraniske 4 months ago
Greetings All, So I have a database where I'm tracking inventory of Fishing Poles. Not having any issues but I'm like to take it a step further. I have a conbo box (pull down box) that only has selectable options of YES or NO. Here's what I want to happen, if the user clicks the NO option, nothing happens. However if the user selects the YES option, I'd like another field to appear where a receipt number can be added. Is there a way to do this? I've been all over YouTube and I'm coming up dry. Thanks so much in advance.
-Glenn
Adam Schwanz 4 months ago
Just make an AfterUpdate on the combo box with an if statement, if its yes make the text box visible, otherwise make the textbox not visible.
I do something almost exactly like this in Access Developer 1. If you check a box that says "shipping address same as billing" then it copies over the address info to the other fields. You'd do the same thing, just change the .Visible property of the boxes you want to show/hide.
Glenn Kraniske 4 months ago
So I did what Adam said but I found an issue. What's happening is if I click the YES option, the appropriate field appears. But when I move to the next record the field is still visible even though the NO option is chosen. Here's my code;
Private Sub FishingPoleSold_AfterUpdate()
If Me.FishingPoleSold = "1" Then
Me.SoldTo.Visible = True
Else
Me.SoldTo.Visible = False
End If
End Sub