Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form with caluclated fields based on paremeter query 1

Status
Not open for further replies.

garychamberland

Technical User
Aug 29, 2001
13
0
0
US
Hello, I am using a report that has calculated fields like ...=DCount("[Employee]","1Quarterly Contact Query","[employee]=true")... The report is based on 3 queries with the primary one being limited by date that is entered into the query each time the report is run. All this works great. The problem lies in that I would like to make the report dependent on a parameter box. When I substitute the date range with brackets [] to prompt for the dates the queries all run fine independently but the report returns #ERROR.

Any suggestions??


Thanx.
Gary Chamberland
 
Instead of using a parameter query, i tend to use a form. In the form, I have a text box, which the user can either type in a date, or not.
In your criteria of your query, you would then have:

forms!formName!textBoxName or forms!formName!textBoxName is null Hope this is ok. If not, just let me know.

Nick (Everton Rool OK!)
 
Thank you for the tip and sorry for taking so long to get back to you. Everything was put on the back burner.

It works very well. For the benefit of anyone else in the same situation, I created the form with date ranges and placed the code as suggested and added a switchboard item to call the form in stead of the actual report. On the new form I placed buttons to call reports that we want to print by date range.

Thanx again & Happy Holidays
Gary C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top