SetValue for checkbox (1 Viewer)

LynnaM

Registered User.
Local time
Today, 06:29
Joined
May 11, 2001
Messages
19
I have a checkbox on a form and when I enter new data into the forms I want the box to not be marked (false) but when I close it I want the box to be marked (true). I am doing this for the purpose of being able to print the report that pertains to the form and only print the forms/reports that I am currently working on instead on the whole report. The info in the fields are not constant so I can not query or select for certain criteria. I tried the SetValue macro but it will not allow me to do this. Any suggestions would be much appreciated. Thanks in advance.
 
D

D B Lawson

Guest
Not sure I fully understand but you could set the default value of the combo box to 0. On the OnClick event of the close button for the form (if you have one!) you could do:

Me.[ComboName] = True

Only a suggestion, but it might not be as simple as that from your point of view.
 

Jack Cowley

Registered User.
Local time
Today, 06:29
Joined
Aug 7, 2000
Messages
2,639
You can put code like this in the On Current event of the form to set the checkbox to False:

If Me.NewRecord then Me.CheckboxName = 0

In the On Click event of the close button or other event that is triggered when you leave the current record you could use code like this to set the checkbox to True:

Me.CheckBoxName = -1
 

Users who are viewing this thread

Top Bottom