Run query for active record on form only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have two tables : invoice header and invoice line joined by the invoice
number.
I also have a form for the invoice header table. There users will enter
comments and should have the option to run an update query which will apply
the comments from the header table to the line table. The query is in sql. Is
there a way that I can have the query run only for the record edited on the
form and not all records in the table?
Thanks,
Kanga
 
Assuming your form is named frmHeader and the textbox on your form is named
Invoice Number, you could put this on the criteria line of your update
query, under the Invoice Number field.
= Forms!frmHeader![Invoice Number]
Only records which meet this criterion will be changed.
 
Back
Top