Text box-how to make it available if a condition is met

scary1

Registered User.
Local time
Today, 08:12
Joined
Feb 25, 2003
Messages
20
I have a drop down list box on a form and the inputter can either select cash, cheque or visa etc etc.
Next to that box i have a text box ad I would like to use this to input the cheque number but ONLY if cheque is selected from the drop down list. If something else is selected I would like this text box to be unavailable for data input.

Can you please help?????
 
Try the following

if listPaymentType = "Cheque" then
me.txtChequeNo.enabled = true
else
me.txtChequeNo.enabled = false
endif
 
So dumb!

Thanks!
Sorry to be so dumb, I am pretty new to a lot of this BUT

Where do I type it??

Thanks again
 
I'm a bit not too brilliant with access events but I'd try putting in in the afterupdate event, just cut and paste the code into the VB thing that comes up.

Let me know if you need more help.
Tom
 
Yes - put it in the AfterUpdate event of the listbox.
 
Or try this one-line solution...

me.txtChequeNo.enabled = (listPaymentType = "Cheque")

hth

shay :cool:
 

Users who are viewing this thread

Back
Top Bottom