0

I would like to find out how to run a select query but have it run in the background and not be seen. I have a "Master Table" with 2000+ records in it, the query I made acts like a filter, taking information from text boxes on a form and uses a query that has criteria to filter the results.

This information is displayed on a normal query page when ran, but I also have a popup form that has multiple records configured, it looks a lot better and I can format this better than a traditional query.

Private Sub button_Click()
DoCmd.OpenQuery "FinderQuery"
Forms("MainMenu").Visible = False
DoCmd.OpenForm "PlotDetails"
End Sub

So Main Menu is where the search functionality is - FinderQuery is the filtered results - PlotDetails is the stuctured, nice looking multiple items form that is linked to FinderQuery.

Any ideas? Thanks

Gustav
  • 53,498
  • 7
  • 29
  • 55
Tom TK
  • 65
  • 9
  • 3
    If the `PlotDetails` form is bound to the `FinderQuery`, you can open the form hidden, requery and show when the requery is done. This will force the query to run in the background (while the form is hidden). – Kostas K. Dec 15 '21 at 11:43
  • Hi, I'm not too sure what you mean. I loaded this up as a hidden form, required it and showed it back and its still not working. Is there a less messy way to do this? I don't understand why access doesn't have this functionality, it seems like a pretty simple thing to ask for. – Tom TK Dec 15 '21 at 12:31
  • Access has this core functionality - as described by @KostasK. Don't open the query, bind the form to it. If in doubt, look up a guide/tutorial on "Beginning with Microsoft Access" or the like. – Gustav Dec 15 '21 at 14:07
  • I have binded the form to it, but there's criteria that needs to be ran each time you type a word and press submit, which then opens both the PlotDetails and the query window up at the same time. The submit button is a run query macro and I cannot find a way to hide the query window pop up. It sounds like we're talking about a work around and not a straight forward option to hide: Yes or no, So this isn't a core functionality, I've done my research beforehand and can't find an answer – Tom TK Dec 15 '21 at 14:57
  • 1
    Why do you open both the PlotDetails and the query? If you open only the PlotDetails, the query will run in the background to update the PlotDetails form. – Kostas K. Dec 15 '21 at 16:32

0 Answers0