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

Expression in ControlSource returning Report Name

Status
Not open for further replies.

Blacknife

Technical User
Aug 24, 2006
3
US
I have a query and I am making a report from it. I set the query as the record source in the report. One of the fields in the query is "Name". When I put "Name" in a text box it obviously will return the data in said feild. But whenever i try to use "Name" in any sort of expression, for example ="I would like to see " & Name & " in my office immediatly" Access will automatically add [ ] around "Name" and whenever I print preview it returns the name of the report instead of the value in the name field in the query. But if "Name" is used outside an expression, by itself, it will return the value in the field in the query. I am totally lost here. I REALY appreciate any help. Thanks.
 
Hi!

Rename the field. Name is a reserved word in Access and, as you have found out, will return different things depending on the context. Access will decide how it is being used and will return the value it thinks fits the context. If you rename the field Access will have no cause for confusion.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Thanks Alot.
I figured that was the problem but i was hoping it wasn't. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top