I have two tables and a form in a Microsoft Access Database. Lets the first table tblCUSTOMERS, and the second table tblINVOICES. tblCUSTOMERS contains fields called CustomerID (primary key), FirstName, and LastName. tblINVOICES contains fields called InvoiceID (primary key), CustomerID (foreign key), and Amount. The form is called frmInvoices and contains textboxes for the fields in tblINVOICES.
What I what to do is create functionality that allows me to search through my customers table, select a customer record from that table, and then return the CustomerID of that record to frmInvoices. Ideally the searching would be in a format like a data grid that allows searching by FirstName, LastName, and CustomerID.
Specifically can you advise me of the simplest way to: 1. Insert a form (lets call this new form frmCUSTOMERS) with something like a datagrid control to show customer records. 2. Update the datagrid on frmCUSTOMERS to display only records matching a query of tblCUSTOMER (such as only customers where firstname starts with 'B') 3. Pass the CustomerID from frmCUSTOMERS to frmINVOICES.
Many thanks,
Brett