check box - check all

D

deb

I am using John Viescas Inventory database. Great database.
frmVendorInvoices is the form and fsubVendInvoiceProducts is the continguous
subform.

fsubVendInvoiceProducts has 3 check boxes.

I want a check box to check or uncheck all of the field instances of
"Invoiced" in the continguous sub form. I do not want the other two series
of check boxes to be checked, only the one named "Invoiced".

However, since it is a continuous form
I need all instances of the "Invoiced" check box to be checked/unchecked.

Really need you help on this one!!
Thanks
 
A

Al Campagna

Deb,
Assuming that [Invoiced] is a stand alone True/False Boolean field...and
that all the records in your subform have some common unique key value (like
InvoiceID)...
Add two buttons to your subform Header section.
One named CheckAll and one named CheckNone.
Create two Update queries.
One to change [Invoiced] to False, against only those records with
the current common InvoiceID.
Another to do the opposite.
Assign each query to the appropriate subform button.
The criteria for both Update queries would be against the InvoiceID
field, and consist of...
(use your own object names)
=Forms!frmYourMainName!frmYourSubformName.Form!InvoiceID
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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