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

Equivilant of [FORMS]! command in a report 1

Status
Not open for further replies.

Stevehewitt

IS-IT--Management
Jun 7, 2001
2,075
GB
Hi Guys,

I have a unbound form with two unbound text boxes. These are for entering in the criteria of a query which is used as the control source of the report in question.

I would like to display the content of these two text boxes onto the report / page header in the report. I have tried the same expression as I have used in the queries:

Code:
[Forms]![frmReportDateSpecific]![txtStartDate]

But I'm getting the very helpfull error of "#NAME?#!

Any help appreciated.

Thanks in advance,


Steve.
 
The form is open. The user open up frmReportDateSpecific and enter in the two date ranges. When they click on "Run" it opens the report which is based on the query. The query uses the above FORMS string to get the data.

Should the above string work?

Thanks,


Steve.
 
In which case, yes it should work. Double check that the control that you are referencing is actually called txtStartDate. I've lost count of the number of times I've forgotton to change Text25 to the name I wanted to use and then spent ages looking elsewhere for a solution to the problem!
 
Hey,

Not too sure what I'm doing wrong, but it seems to be working fine in the report header - just doesn't like it when it's place in the page header. No idea why, but seems to be fine now!

Cheers,


Steve.
 
Code:
[COLOR=red]=[/color][Forms]![frmReportDateSpecific]![txtStartDate]
This may work in the page header/footer too. But not sure about the pages except the page 1

________________________________________
Zameer Abdulla
Visit Me
Hold your child's hand every chance you get.
A time will come when he or she won't let you.
 
Doh!

That's why it wasn't working! :)

Enjoy the star and thanks again Zameer!


Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top