It should be fairly strait forward to add a record to a recordset, but I’m having problems with this one. I have created a form with a text box and two listboxes. Here’s how its suppose to work: Listbox1 has a query as its rowsource. Listbox2 has a table as its rowsource. Type in a last name in the textbox, which in turn automitically searches listbox1 for a matching record. This part works fine. Double-clicking the searched for name in listbox1 is suppose to add that record (actually, just the PopID from that record) to the table represented in listbox2.
I know I need to create a recordset and use the AddNew method. In order to get the search feature of listbox1 to work correctly, I set the bound column to a column other than the PopID column needed for the AddNew method to work. Now, when I use AddNew and reference listbox1, the bound column populates my table. I need to have another field from listbox1populate the table. How do I reference this other field?
Thanks for all your help?