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!

="Blah and " & field, etc.

Status
Not open for further replies.

Dannybe2

Programmer
Jan 31, 2001
136
GB
How do I create a field which fills in other information not in that field. For example, I have a field which has a number of hours, and I want to add the word "hours" after it, whenever I try it as follows it comes up with a #error in the field:

=[TimeHours] & " Hours"

Thanks
 
Hi, =[TimeHours] & " Hours" looks correct. If you are getting an error, [TimeHours] may be misspelled. A way to check that would be to set the control source to TimeHours. If that comes in correctly, then your statement should work.
 
I have two options for you:

- use the format property of the text box

- use another textbox and make the original textbox hidden. I have to explain this one. If your textbox is called TimeHours, than [TimeHours] is probably calling the textbox itself, not the field in the underlying query or table. So making the textbox TimeHours invisible and using your phrase (=[TimeHours] & " Hours") in another (visible) textbox may solve your problem.

Hope this helps or amuses,

Willem Bogaerts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top