I thought that opening a Recordset based on a Query was identical to opening a Recordset based on a Table? Apparently not. The below works for Tables in my Database but not for Queries. Any suggestions as to how I can open a Recordset based on my Query named "QryTest"? Here is what I have that gives me an error stating "No value given for one or more required parameters":
Dim db As DAO.Database
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.ActiveConnection = CurrentProject.Connection
Yes, it appears that I am using a "parameter query" without evening knowing what one is!! The Query that I am trying to open is populated via a ListBox on a form. I am trying to run the listbox via VBA code (i.e. simulate a left click of a VBA-selected item) and retrieve the resulting Query, also via VBA code. Sounds like I have my work cut out for me.
Thanks much for your suggestion. Of course, any other thoughts would be greatly appreciated.