Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open form to browse query results

Status
Not open for further replies.

nakedbamboo

Technical User
Oct 8, 2003
36
US
I am sure this is easy to do, but I can't find any reference to it. I am trying to run a query and instead of displaying the results in tabular form, open up a form to browse the records one at a time. I cannot figure out how to open the form and put results into it. At the same time I am saving the query results to a file. Below is the code I am trying to get working:

Query name - AlumniSearch
Form for search results - SearchResults

Dim FileName As String
Dim frm As Form

DoCmd.OutputTo acOutputQuery, "AlumniSearch", acFormatXLS, FileName


Set frm = CreateForm(, "SearchResults")
DoCmd.Restore
frm.RecordSource = "AlumniSearch"


Currently this just opens up a blank form in design mode. It does save the results correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top