dynamic form submission

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.
 
K

Kelvin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top