JakeB52
asked on
Passing subform values to a parameter query
I have a subform that passes two dates into a criteria expression in my query. I keep getting prompted for parameter entries for both dates.
These are the forms I'm using...
frmReports: is the main form
frmSubReports: is the name of the subform control on the main form
frmSubReportsDates: is the name of the subform that is called and appears in the the subform control
ctrFromDate and ctrToDate: the names of the DTPicker controls contained in frmSubReportsDates
Originally, I was testing with just the subform and everything seemed ok.
I used this...
Between [Forms]![frmSubReportsDate s].[ctrFro mDate] And [Forms]![frmSubReportsDate s].[ctrToD ate]
Once I opened up the main form containing the subform then I started to receive the prompts asking to enter parameter values.
I have since modified the query expession to this...
Between [forms]![frmReports].[frmS ubFormRepo rts].[Form ]![frmSubR eportsDate s].[ctrFro mDate] And [forms]![frmReports].[frmS ubFormRepo rts].[Form ]![frmSubR eportsDate s].[ctrToD ate]
This is where I'm stuck. Any suggestions?
These are the forms I'm using...
frmReports: is the main form
frmSubReports: is the name of the subform control on the main form
frmSubReportsDates: is the name of the subform that is called and appears in the the subform control
ctrFromDate and ctrToDate: the names of the DTPicker controls contained in frmSubReportsDates
Originally, I was testing with just the subform and everything seemed ok.
I used this...
Between [Forms]![frmSubReportsDate
Once I opened up the main form containing the subform then I started to receive the prompts asking to enter parameter values.
I have since modified the query expession to this...
Between [forms]![frmReports].[frmS
This is where I'm stuck. Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Steve, your suggestion pointed me in the right direction.
The final solution was as follows:
Between [Forms]![frmReports]![Chil
Thanks for your help.