Selection criteria from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please advise.

In my accounts database, I would like to produce some reports based on
selection from user. I have created the form with two combo boxes cbxCompany
and cbxProject, and two text boxes txtBeginDate and txtEndDate, to allow user
to enter selection criteria for the report (this form must open first before
the report is shown).

User can either not enter any input, and the report should show all data
(ignore Null values). User can also specify the criterias below:
1. Just company name - show all data for the company selected
2. Just project name - show all data for the project selected
3. Company & Project - show all data for the project based on the company
selected
4. Begin Date & End Date - show all data within the specified date
.... and so on (you get the picture)

I also created a report that shows All data from the Transaction table. The
form should use this report based on the criterias selected.
Please help me, as I am not sure where I should put the codes.
 
spacerocket said:
In my accounts database, I would like to produce some reports based on
selection from user. I have created the form with two combo boxes cbxCompany
and cbxProject, and two text boxes txtBeginDate and txtEndDate, to allow user
to enter selection criteria for the report (this form must open first before
the report is shown).

User can either not enter any input, and the report should show all data
(ignore Null values). User can also specify the criterias below:
1. Just company name - show all data for the company selected
2. Just project name - show all data for the project selected
3. Company & Project - show all data for the project based on the company
selected
4. Begin Date & End Date - show all data within the specified date
... and so on (you get the picture)

I also created a report that shows All data from the Transaction table. The
form should use this report based on the criterias selected.
Please help me, as I am not sure where I should put the codes.


You should use code in the print button's click event
procedure to check each control's value and construct the
OpenForm method's WhereCondition argument.

There have been a few examples of this posted in just the
last couple of weeks. Try searching (Google) for other
discussion on this topic in this newsgroup.
 
Back
Top