update query from a subform?

B

Brook

Good Day All,

I have an frminvoice (contains invoicenumber, invoicedate, etc) &
frminvoicedetails (contains order information, size, colours, etc).
frminvoicedetailssubform is controlled by tblinvoicedetails, and there are 3
fields from frminvoicedetailssubform for each order/record that I am updating
to my tblinventory.

What I am wanting to do is update tblinventory with all the records for a
specified invoice, but when I run my update query, it only updates the
selected record within my subform, then I have to click on each order/record
within my orders subform to update it to my tblinventory.

Does anyone have any suggestions on how I can update each record that
matches between the frminvoicedetailssubform and my tblinventory all at once?
Meaning if an frminvoicedetails subform has 5 records, all 5 records will be
updated, comparing a field based on my update query (ordernumber &
serialnumber)?

Below is my code for my updatequery:

UPDATE tblinventory SET tblinventory.RugStatus =
forms!frminvoices!frminvoicedetailssubform.form!invoicetype,
tblinventory.invoicenumber =
forms!frminvoices!frminvoicedetailssubform.form!invoicenumber,
tblinventory.clientlocation =
forms!frminvoices!frminvoicedetailssubform.form!clientname
WHERE
(((tblinventory.orderid)=[forms]![frminvoices]![frminvoicedetailssubform].[form]![orderid]));

thanks in advance..

Brook
 

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