Tickbox problem

T

Tony Williams

I have a series of tickbox controls on a form. When the user clicks on them
a form is opened, I used the onclick event to do this. However if the user
clicks the tickbox in error the form will open and then if they unlick it if
they have clicked in error the form opens again. Is there anyway that I can
stop the form opening on unclick?
 
R

Rick Brandt

Tony Williams said:
I have a series of tickbox controls on a form. When the user clicks on them
a form is opened, I used the onclick event to do this. However if the user
clicks the tickbox in error the form will open and then if they unlick it if
they have clicked in error the form opens again. Is there anyway that I can
stop the form opening on unclick?

Use AfterUpdate instead and test the value of the CheckBox to decide if the form
should be open.
 
T

Tony Williams

Thanks Rick! I am new at VBA how would I test if the form should be open?
Tony
 
T

Tony Williams

Thanks Rick worked just fine
Tony
Rick Brandt said:
If you only want to open the form when they toggle the CheckBox from False to
True then you need to test the state of the CheckBox after it has been changed.


If Me!CheckBoxName = True Then DoCmd.OpenForm...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top