I have a form built on query1. query2 contains records that are related to query1 via the query1 primary key. I want to put a button on the form that will retreive a record from query2 that matches the primary key value of query1 and has a "like" condition in another one of it's fields. Once I get this record, I'll clean it up and use it to open a file for the user to view. All of the button stuff and opening file stuff I can do, what I can't figure out how to do is code a query in VBA so that I can get the record and process it. RunSQL only works for action queries, OpenQuery actually opens the query and displays the data, neither of which are usefull to me. I have written a fair amount of code earlier in my career and I'm just now getting back into it using VB. I suspect that there is a simple answer but I sure can't find it.
Thanks
Rich
Thanks
Rich