HELP HELP!!!!! Access queries using parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query in which I have the user select the beginning and ending
periods for process dates.

I then want to create a second query from the original query.

The problem is:
when I run the second query, it again asks me for the parameters
(beginning and ending periods) that I ran the
1st query on. How do I pass the chosen dates through to the second
query so that the user doesn't
have to re-enter the parameters?
 
Dear Toots:

The first cause of this might be that the parameters you want to repeat are
not spelled, puncutuated, or otherwise EXACTLY identical. Have you declared
them?

One sure way of avoiding such problems is to have the user enter the
parameters on a form. Your queries could reference this, and the user would
never have to enter them twice. In fact, the user could change the
"beginning period" without changing the "ending period" and save having to
re-enter the parameter that didn't change. In addition, you could check to
make sure the two dates really are dates, and that the beginning date is not
after the ending date, before running the query. This is a very good
approach, indeed. Just check for thexe conditions and give error messages
in message boxes to alert the user, and don't proceed to running the query.

Tom Ellison
 
Back
Top