Multiple Tick Boxes and Queries.

G

Guest

Hi Guys, little problem I'm hoping you can help with.

I've created an ordering system using the classic two table structure.

Orders
Order_Details

I have a tick box in Orders (called Order_Complete) which I wanted to become
ticked automatically when a certain situation occurs.

For Order_Details each detail has a tickbox called Item_Complete I want the
Order_Complete tickbox to become ticked when all of the items for that order
are complete.

I..e if all the Item_Complete tickboxes for an order are ticked then that
order becomes complete.

How do I do this?
 
M

Marshall Barton

Richard said:
Hi Guys, little problem I'm hoping you can help with.

I've created an ordering system using the classic two table structure.

Orders
Order_Details

I have a tick box in Orders (called Order_Complete) which I wanted to become
ticked automatically when a certain situation occurs.

For Order_Details each detail has a tickbox called Item_Complete I want the
Order_Complete tickbox to become ticked when all of the items for that order
are complete.

I..e if all the Item_Complete tickboxes for an order are ticked then that
order becomes complete.

Create two text boxes in the subform's header section. Name
one txtTotal and set its expression to =Count(*). Name the
other one txtCompleted with the expression
=Abs(Sum(Item_Complete))

Then the main form check box can use the expression
=subform.Form.txtTotal = subform.Form.txtCompleted

If you were thinking of saving that value in the orders
table, don't. There's too many ways for the value to become
out of sync with the order details data.
 

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