Checkbox

EEK

Registered User.
Local time
Today, 13:41
Joined
Feb 2, 2006
Messages
20
Iwant to suppress the message "The macro or function set to the Beforeupdate or ValidationRule property for this field is preventing Microsoft Access from saving the data in the field".
The message is correct-Iwant to prevent updating the checkbox if certain conditions aren't met.
Any ideas?
Thanks
 
if you conditions are met you can disable the checkbox with VBA.
 
Let me explain: the user clicks the checkbox. The checkbox has a Beforeupdate event that checks the condition. If that conditon is true I want to remove the check from the checkbox and prevent update. If the is false the checkbox is updated. Another application looks in the checkbox to see if it's checked, and if so extracts the data for another database to use.
How do un-update the cjeckbox after it's been clicked without getting that message?
Thanks
 
If you go into the module for your form and to the BEforeUpdate function for your button you will notice that there is a parameter called Cancel as Integer.
If the condition is met and you want to cancel the update to the check box you can write Cancel=-1. So you could use this in a IF statement

if Condition=True
Cancel=-1
End if
 
Thank you KeithG....the cancel option workd great.
 

Users who are viewing this thread

Back
Top Bottom