P
Pendragon
Access03/WinXP
I have a form with several tab control pages. Each page refers to a
different module within the database (e.g., membership, events, product
orders, etc.). Rather than creating unbound text boxes on each tab control
page for a user to input a start and end date (which will filter the various
reports run by command buttons on the pages), I thought it more efficient to
have a single set of unbound text boxes to which all tab control pages (and
the reports/command buttons on them) could refer, namely txtStartDate and
txtEndDate.
For clarity, I placed these boxes in the form header as all of the tab
control pages are obviously in the detail section. To test the reference, I
ran one of the reports queries in Query Design mode with a specific reference
to the text fields:
SELECT CompanyID, CompanyName, RecordCreateDate, UserID FROM tblCompany
WHERE tblCompany.RecordCreateDate >= Forms!frmReports.txtStartDate and
tblCompany.RecordCreateDate <= Forms!frmReports.txtEndDate.
When I run the query, I get an error message noting that the db jet engine
does not recognize [Forms]![frmReports].[txtStartDate] as a valid field name
or expression.
Can you not place such unbound fields in a form header? Do these need to be
in the form detail section, but not on a specific tab control page?
Thanks for any education you can provide.
I have a form with several tab control pages. Each page refers to a
different module within the database (e.g., membership, events, product
orders, etc.). Rather than creating unbound text boxes on each tab control
page for a user to input a start and end date (which will filter the various
reports run by command buttons on the pages), I thought it more efficient to
have a single set of unbound text boxes to which all tab control pages (and
the reports/command buttons on them) could refer, namely txtStartDate and
txtEndDate.
For clarity, I placed these boxes in the form header as all of the tab
control pages are obviously in the detail section. To test the reference, I
ran one of the reports queries in Query Design mode with a specific reference
to the text fields:
SELECT CompanyID, CompanyName, RecordCreateDate, UserID FROM tblCompany
WHERE tblCompany.RecordCreateDate >= Forms!frmReports.txtStartDate and
tblCompany.RecordCreateDate <= Forms!frmReports.txtEndDate.
When I run the query, I get an error message noting that the db jet engine
does not recognize [Forms]![frmReports].[txtStartDate] as a valid field name
or expression.
Can you not place such unbound fields in a form header? Do these need to be
in the form detail section, but not on a specific tab control page?
Thanks for any education you can provide.