Pop up Exited without completion, untick check Box

Aimn_4U

Registered User.
Local time
Today, 10:56
Joined
May 14, 2019
Messages
33
Hi all,

I am hoping this is possible and someone can help me with a code (or macro).
I have a checkbox set up in a form, when the checkbox gets ticked it brings up a subform which needs to be completed. However, if the button is ticked and the subform is not complete or the user changes their mind, I would like the checkbox to auto untick. Is this possible ?

Also, at the moment, the subform appears when the box is ticked or unticked, I would only like this to appear when someone ticks it, not if they untick it. Is this possible.

I hope all makes sense, please let me know if any further details are required.

Thank you
 
Hi. When you say “subform,” are you talking about a popup form? If you want the form to only open when the box is checked, then you could test for it. For example,
Code:
If Me.CheckboxName Then DoCmd.OpenForm "FormName"
 
Hi theDBguy,

My apologies, yes it opens a pop up form.

In regards to the below, where would I put this code ?
 
Hi theDBguy,

My apologies, yes it opens a pop up form.

In regards to the below, where would I put this code ?
You would put it wherever you're using the code to open the form now. All I was suggesting is give it a condition to open. If the condition fails, it doesn't open. That's what the If Me.CheckboxName does. It checks if the checkbox is checked. If so, it opens the popup form. If it's not checked, then it doesn't do anything - it doesn't open the form.
 
However, if the button is ticked and the subform is not complete or the user changes their mind, I would like the checkbox to auto untick.
I get a different picture. Form opens when box is checked so that is not the issue. It's how to deal with the popup form not being "completed" - whatever that means. Without a clear understanding of what defines completed or "user changes their mind", focused advice cannot be given. Maybe there is a close or cancel button on it and a check for Dirty might be helpful. Changes are not saved? Or form is not dirty? Then uncheck box on popup close?
 

Users who are viewing this thread

Back
Top Bottom