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

How to add text to a query 1

Status
Not open for further replies.

Bill4tektips

Technical User
Joined
Aug 5, 2005
Messages
175
Location
GB
I have a Report running off a query and dependent on the inputs on a Form I need it to add text. What I have in my query at the moment is
Select: IIf([Monthly Status]![SelectY/N]="Yes",[Monthly Status]![meeting number]+"Half",[Monthly Status]![meeting number])
What I am trying to achieve is when SelectY/N field is yes then it puts the word "Half" after the 'meeting number' field. All I am getting at the moment is #Error.
 
Replace + with &

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I tried that before and it doesn't work. In previous queries where I've needed to put text between fields I have put & "text" &, but this is the first time I have wanted to put text at the end and that doesn't seem to work.
 
Prefix all your control references with [forms]!

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Just out of interest, what type of field is "SelectY/N"?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
I had a feeling it might be, go with my previous advice, but change the [Monthly Status]![SelectY/N]="Yes" to
Code:
[forms]![Monthly Status]![SelectY/N]=True
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Glad I could help, thanks for the star [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top