nakedbamboo
Technical User
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 the 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.
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.