G
Guest
I have created a form named frmcommbysource with 3 controls. First control
is a combo box named cbosource that has two fields, ID and name. The other
two controls are both date/time picker controls called dtstart and dtend
respectively. I then created the first of 3 queries used for a summary
report. Two of the fields in this query are Tour_date and name. I put the
following into the Tour_date criteria: "
Between forms!frmcommbysource.dtstart and forms!frmcommbysource.dtend. I
then created 2 parameters forms!frmcommbysource.dtstart date/time and
forms!frmcommbysource.dtend date/time. I then put a button on the form and
added the following code in the click event:
dim stDocName as string
stDocName = "qryCommissionSummary"
docmd.OpenQuery stDocName, acNormal, acEdit
When I enter the dates and push the button the query runs ok.
I then added the following to the [name] field criteria:
forms!frmcommbysource.cbosource.column(1)
-- Since column 0 is the id and column 1 is the name.
Then I added the following to the parameters:
forms!frmcommbysource.cbosource.column(1) text
when I run the frmcommbysource and pick a name from the combo, then dates
and hit the button I get the following error :
Undefined function forms!frmcommbysource.cbosource.column... in expression
I have checked for missing references and there are none.
Thanks for the help.
Ray
is a combo box named cbosource that has two fields, ID and name. The other
two controls are both date/time picker controls called dtstart and dtend
respectively. I then created the first of 3 queries used for a summary
report. Two of the fields in this query are Tour_date and name. I put the
following into the Tour_date criteria: "
Between forms!frmcommbysource.dtstart and forms!frmcommbysource.dtend. I
then created 2 parameters forms!frmcommbysource.dtstart date/time and
forms!frmcommbysource.dtend date/time. I then put a button on the form and
added the following code in the click event:
dim stDocName as string
stDocName = "qryCommissionSummary"
docmd.OpenQuery stDocName, acNormal, acEdit
When I enter the dates and push the button the query runs ok.
I then added the following to the [name] field criteria:
forms!frmcommbysource.cbosource.column(1)
-- Since column 0 is the id and column 1 is the name.
Then I added the following to the parameters:
forms!frmcommbysource.cbosource.column(1) text
when I run the frmcommbysource and pick a name from the combo, then dates
and hit the button I get the following error :
Undefined function forms!frmcommbysource.cbosource.column... in expression
I have checked for missing references and there are none.
Thanks for the help.
Ray