Automatically tick, tick boxes.

Foster

Registered User.
Local time
Today, 15:51
Joined
Jul 16, 2003
Messages
19
Hi All.
Apologies if this query appears in an existing thread. Have looked but cannot find an answer as don't really know what to search under!

I have a form with a field called "Handed Over" with a tick box. When the job (record) is "handed over", I have been going back through every job and ticking the box for that record. It is done month by month and there are normally 80 to 100 jobs completed so there are quite a few records to go back into and tick.
Is there a way to automatically make all records ticked when required? I have tried a macro with "setvalue" but it doesn't seem to work.
Many Thanks in advance.
 
Create a query that updates your CheckBox to 'True' according to the records on the form, using something like
[forms]![YourMainForm]![YourCheckBox]
in the Criteria of the query. See the example attached.

IMO
 

Attachments

Hi Imo,
Thanks for the example and your help.
As per your reply, I have created 2 queries, 1 for true and 1 for false, as in your example. When I run them, I get a message box appear which asks me to "enter parameter value" If I put in 0 for true and -1 for false it works fine. You do not get this on your example, therefore where am I going wrong. I have gone through yours and double checked everything (but have obviously missed something!!)

Once again, thanks for your help.
 
The queries criteria is based on the Open Form, therefore if you run the query alone (without the form open) it will ask you to enter the parameter value. Where my criteria for the query is...
[forms]![frmCheck]![Check]
you'll need to change "frmCheck" to the name of the form you view the items to select, and "Check" to the name of the CheckBox control on that form. Then create two buttons on the form, and in the Click event of the button put the following code to run either the "Check All" or "Deselect" query...
Code:
 Private Sub YourButton_Click()

    DoCmd.OpenQuery "TheNameOfYourQuery", acNormal, acEdit
    Forms!NameOfYourForm.Refresh

End Sub
Hope this helps
IMO
 
Imo,
Didn't realise the form had to be open!! Now all sorted.

and again, and again, and again....... thanks for your help!!!!


Foster.
 
Glad you got it working

IMO
 

Users who are viewing this thread

Back
Top Bottom