how can I use a check box to control

pavlos

Registered User.
Local time
Today, 19:50
Joined
Mar 10, 2009
Messages
79
Hi,

I have a small pop up form that is bound to a select query. I need to add a check box on the form so that when it is checked the form will pop up every time the db opens.
 
Last edited:
i am so soryy, it's a misstype. I meant db!

I changed it!
 
hi. you can set which form will open when the db opens:
tools-startup-display form/page.

put some code on the form's Open event; the Open event can be canceled. check the value of the check box. if true, continue opening the form, if false, cancel = true (don't open the form, do something else).
 
Dear Wazz,

Thank you for replying. I am already using this option to open at startup another form, you can call it the MAIN form. Now I am looking for code to put it in the open-event of the MAIN form to control the opening of the SMALL form based on its check box, when the check box of the SMALL form is true it will open it.
 
on the second form:
use the form's Open event; the Open event can be canceled. check the value of the check box.
IF chkbox=true
'continue opening the form (do nothing)
ELSE
cancel = true '(don't open the form)
END IF
 
on the second form:
use the form's Open event; the Open event can be canceled. check the value of the check box.
IF chkbox=true
'continue opening the form (do nothing)
ELSE
cancel = true '(don't open the form)
END IF

Wazz,

using this code the second form will never open again once the check box is unchecked (set to false).
 
right. put the check box on the main form.
 
a check box is either on or off. looks like you have specific criteria for opening the small form, or not. maybe a check box is not the way to go. how about an If-block that describes what you need?
Code:
If x or y or z Then
   open
Else
   don't open
End If
or
Code:
If x or y or z Then
   open
ElseIf a or b or c Then
   do something else
Else
   don't open
End If
 
A bit confuse hear, I cannot really understand what you mean with the above IFs...

Let me rephrase the whole concept. When the db starts a MAIN form opens, in the Open Event of this form I use a macro to open the second small form. However, I would like to be able to control this automatic opening with a check box on the second small form, if the check box is set to True then the second little form will open when the MAIN form opens, if the check box is set to False (unchecked) then it will not open.

Probably a condition to the macro will be the solution…. Also, I would like to remind you the second little form is bound to a query, basically the form displays calculations.
 

Users who are viewing this thread

Back
Top Bottom