Can I pass parameters from a macro to query?



Hi - I have 3 access queries which I run via 1 macro.

Each of the queries now requires 2 parameters when they the run. The
parameters are start and end dates.

I have built the parameters into the queries but on running the macro
I have to enter each of the dates 3 times - once for each query.

Is there an easy way to ask for the parameters once and for these to
be passed onto each query?

TIA
.



Relevant Pages

  • Re: If query results are null ...
    ... To do this I ended up creating two queries. ... First was a union query: ... And the second was a query that I stuck in the row source of the combo box: ... I quickly tried the macro and couldn’t get it to work. ...
    (microsoft.public.access.macros)
  • Re: Multiple Parameter Queries
    ... I run the query puttin an value I get the same. ... So instead of me creating 20 queries I ... >> I created a macro with Macro names example, ... >> so if I want Europe, I would click the europe button ...
    (microsoft.public.access.macros)
  • Re: Performing multiple queries automatically
    ... just create a macro with the queries to do it for you in i go. ... >I am performing a set of very simple database queries in Microsoft Access, ... > If I have two 'newcomers', I type the query twice etc. ... > 'newcomers', that I have stored in an Excel file, so that I ...
    (microsoft.public.access.developers.toolkitode)
  • Re: APPEND QUERY RUNS ON ITS OWN BUT NOT IN A MACRO
    ... In the macro yes those settings are required and the other options are not ... The subject line is kind of deciptive because those queries he ... Not all joint query is ... the Append query will not modify the records, it will only show the data ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Select Queries in Macro - Close all windows
    ... select queries to calculate the sum so I can append to a master file. ... But when I create a macro with the openquery action, ... Is there a macro or VBA that I can use to close all query ... windows once the macro is completed? ...
    (microsoft.public.access.queries)