If Statements

jojo86

Registered User.
Local time
Today, 16:59
Joined
Mar 7, 2007
Messages
80
Hi, I have another problem with my Access database now...

I am trying to disable fields when a certain value is chosen. I can do it for one field with this code:

If ALLOCATION_LP = "Other" Then
OTHER_ALLOCATION_LP.Enabled = True
Else
OTHER_ALLOCATION_LP.Enabled = False
End If

That one works perfectly well, but I have another one that needs to disable two fields instead. If they choose "No Extant PP", I want it to disable two fields; one combo box - PLNG_PERMISSION_STATUS_2 (which I can get to and it works) and also an "Other" text box - OTHER_PLNG_PERMISSION_STATUS_2 (this is where i get stuck). I have tried two If statements, but whether I'm writing them wrong, I'm not sure.

I would really appreciate the help. Thanks.
 
Taking your example...
If ALLOCATION_LP = "Other" Then
OTHER_ALLOCATION_LP.Enabled = True
' add more fields here to enable
Else
OTHER_ALLOCATION_LP.Enabled = False
' add more fields here to disable
End If


It should not be that hard, what is it you have that is not working.

P.S. Does this belong in the query forum??
 
Last edited:
Oh yeah, totally forgot which forum I was in - sorry.

And thanks for the help, I was trying to put an 'and' into the If Statement. It works now. Thanks
 

Users who are viewing this thread

Back
Top Bottom