I have a form (single form view) “frmInvoiceClient” which holds various information on invoices sent, or to be sent, to clients. One piece of information is the invoice foreign key.
An invoice lists a number of items which add up to the total invoice. I need to add the invoice foreign key to each item.
As a first step I tried to extract the invoice foreign key from frmInvoiceClient. This is my SQL:
SELECT tblInvoices.InvoicePK, tblInvoices.ClientFK
FROM tblInvoices
WHERE (((tblInvoices.ClientFK)=[Forms]![frmInvoiceClient]![ClientFK]));
When this query fires, only one record is showing on the form frmInvoiceClient but the query gives results for all invoices for that client.
How can I make the query show the result for only the record shown on frmInvoiceClient?