How to update a group of records at the same time

G

Guest

My database generates and prints invoices for me. Once I print out my
invoice from a group of records, I must go in and update each record
individually to mark the "Invoice Sent" field as "True." I would much rather
have a one-step procedure that would update all records to-date from a single
given client rather than doing it piecemeal.

I have never used macros before. Can I design a macro to do this? If so,
how? If not, is there some other way I can accomplish this? Thank you.
 
S

Steve Schapel

KT,

This is a job for an Update Query. Make a query that returns the
records you want to set the Invoice Sent field, make it an Update Query
(select Update from the Query menu in design view of the query), and
enter "True" in the Update To row of the query design grid in the
Invoice Sent column.

If you want to use a macro to make the update query happen, you can use
the the OpenQuery action in your macro.

Having said that, your very requirement to do this type of process
probably highlights a design flaw in your database. Normally you would
not have an Invoice Sent field at all, and if you did, it wouldn't be on
each record where multiple records are included in one invoice. If you
would be interested to explore this aspect further, post back with
details of the tables involved in the invoicing process, along with some
examples.
 

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