dynamic form submission

  • Thread starter Thread starter chris
  • Start date Start date
C

chris

i have a date form that inputs a from date and a to date.
from this form i want to run a query based on these dates.

the query that it runs is depenedent on where the date
form was opened from.

can i pass a variable into the date form that states which
form it came from?

from there it needs to run the query based on the dates
selected in the date form and run the query sent forth
from the previous form.

any help in this matter is greatly appreciated.
 
I am assuming you are using DoCmd.OpenForm to open your date form. The 6th
argument of the OpenForm method can be used to pass information.
DoCmd.OpenForm frmDate,,,,"Form 1"

In the date form you can check this value using Me.OpenArgs to retrieve this
value and perform you criteria.

If Me.OpenArgs = "Form 1" then ...

Kelvin
 
Back
Top