Enabling a field when certain criteria are met

majury221

Registered User.
Local time
Today, 12:19
Joined
Jan 18, 2006
Messages
10
Hi, I have a field in a form that says when you are able to book a certain event, and i want the field in which the event can be booked, to remain unable to be edited until the tick box says yes. Is that possible?

Chris
 
Hey majury221,

Yes, it is possible. All you should need to do in the check box AfterUpdate Event is:

It Me.CheckBoxName = True Then
Me.TextBoxName.Enabled = True
Else
Me.TextBoxName.Enabled = False
End If

HTH,
Shane
 
Unfortunately this does not seem to work, if i attach the database to the post...will someone have a look at it? It is in the frmBook that I wish this argument to work, so that when Village Party Allowed is ticked, the tick box for village party becomes active, is there anyway anyone can do this for me? The database is too big, so if someone emails me, then i can email the database to you. Instead of being unable to edit the field, can the field be hidden completely from view?

Chris
 
Last edited:
try

on form load set
me.village_party.visible = false

on village_party_allowed after update set

if me.village_party_allowed = true then
me.village_party.visible = true
else

End if

Ash
 
Hi Chris,
If you want to send it to Rural Guy at Wild Blue dot Net without the spaces, I would be glad to have a look at it. Be sure to include specific instructions on what you are trying to accomplish.
 

Users who are viewing this thread

Back
Top Bottom