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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report referring to a form and #name?

Status
Not open for further replies.

cochise

Technical User
Mar 27, 2001
171
US
I have a query that joins three tables. The join query, invoices, has a date field. I have a form with two text boxes. The only thing i've done to these boxes is name them, startdate and enddate. I saved the form as DateRange. My query, invoices, has the following criteria for the date field, Between [Forms]![DateRange]![startdate] And [Forms]![DateRange]![enddate]. Then I have a report that uses the invoices query. I also have a text box who's control is set to: =[Forms]![DateRange]![StartDate]. I have a corresponding text box for the enddate. The purpose is to have the report print the date ranges used in the report. However, everytime I run the report I get the error message #name?. What could I be doing wrong? Do I need to change the properties of the form or the control or use VBA or something?
 
#Name means the field is mis-spelled or Access odes not know what field it is.
Delete or Renamed it is the usual culprit.
Easiest fix: Copy and paste All field names when you are using them or pick them from Combo boxes or Selection lists.

Make sure you did not drop a field or rename it on the query or table where it is refereing to.
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
actually I'm pretty sure that's not the problem. I can run the query by putting the dates in. I've verified that the spelling is correct, in fact I've used the ... function to name the control.
 
Are you runnin report just by clicking on Print Preview or from a Command Button on the Form DateRange?
 
I think i might have figured it out. I was running the report from inside the report module, but didn't have the form open.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top