Open if not "Check"

CodeCracker0291

Registered User.
Local time
Today, 09:04
Joined
Jan 19, 2002
Messages
33
I'm trying to make a combo box in my form and i have all the payment methods like Cash, Check, etc. well i want if I select Check another text box appears so i can put in Check Number. I don't want the box to be there unless Check is selected.
 
One thought that may help. Set your text box for check # visible = false, then in your combo box After Update add code something like this:


If Me!ComboBox = "Check" Then
Me!txtCheckNumber.Visible = True
Else
Me!txtCheckNumber.Visible = False
End If

You will probably need to add this same code to your Forms On Current event too so that when the form opens if the combo box value is "check" then the text box holding the check number will be visible.

HTH
Shane
 
Sorry but it didn't work....maybe if i gave you all the info you could type the exact code that i'd need? The combo box with the check, cash, etc. is name "Payment Method:"
the text box that the check number will go is named: "Check#". I also have Access 2000 if that makes a huge difference. Thanks.
 
If Me![Payment Method] = "check" Then
Me![Check#].Visible = True
Else
Me![Check#].Visible = False
End If

Give that a try and let's see what happens.
 
Nope, sorry I don't know what I'm doing wrong. I've greated a text box with a label and I right click on the white box and beside the Visible I type No. then i go to the event tab and on the after udate I copy the exact code you gave me. It's invisible but when I select Check nothing happens. When I put the code in the on current of the form it says something about can't find macro or somthing like that. Sorry for the confusion. Thanks Again.
 
In the combo box properties. You've gone to the Event Tab, then to After Update event you've chosen Event Procedure, then clicked the ... to the right of the field box and pasted the above code? If that's correct then I'm not sure why the code would not work unless we have the names of the fields wrong.
 
Thank you so much. Stupid me I was putting the code in the Text Box's after update. It's working fine now and now I'm trying to make a code to were if this buuble is filled in the Shipping address boxes dissapear. But thank you so very much. I really do appreciate it.
 

Users who are viewing this thread

Back
Top Bottom