Having Trouble Concatenating

Rebel

Registered User.
Local time
Today, 18:38
Joined
May 19, 2005
Messages
17
I have a fleet of equipment at a factory that is divided into groups (e.g. fork lift, dump truck, etc.) belonging to certain departments. I have a report that shows all of the equipment ordered by Departments then by Groups. However, I often get asked to provide just a list for one Department or for a just one equipment Group. To address this I created a couple of generic reports that use a prompt in the query to just pull up the info for one department/group.

The report works fine and is everything I wanted, but I'm having what would be considered a little "Quality of Life" problem. I want the title of the report to show who or what the report is for. For instance, if I want to see the list of mobile equipment for Product Team 6, then I want the title of the report to read, "Product Team 6 Mobile Equipment List." The "Product Team 6" part is in the underlying query (qryAllEquipment_byTeam) in a field called Team. I would like to have [Team] as the title with " Mobile Equipment" tacked onto it.

I did a little reading on concatenation (here and in Access Help) and it looked pretty straightforward simple. But I am doing something wrong that I can't figure out. The first thing I tried was a text box with =[Team] & " Mobile Equipment." It brings back the right record set, but the title just says "#Error." Here is a sampling of some other things I have tried:
=([Team]) & " Mobile Equipment"
=[qryAllEquipment_byTeam]![Team] & " Mobile Equipment"
=[qryAllEquipment_byTeam].[Team] & " Mobile Equipment"

I obviously have some sort of syntax wrong, but I can't figure it out. Does anyone have any pointers?
 
Check the name property of your combo box. If you used the report wizard to create your report the combo box name is likely "Team" because it names it the same as the field. If so change it so something like "txtTeam".

=[Team] & " Mobile Equipment" should work as long as the text box's name is not the same name any field in your report.
 
Well, I'll be darned. Who woulda thought something that simple would mess things up?

Thanks a bunch, Rich. That did the trick.
 

Users who are viewing this thread

Back
Top Bottom