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!

linked combobox and concatenated fields in reports

Status
Not open for further replies.

rienk

Technical User
Apr 2, 2003
9
US
Okay, let's see.
I've got a report with a unbound textfield. In it I coded something like this... (example)

="stored: " & [textbox1] & " - " & [linkedcombobox1] & " - " & [linkedcombobox2]

You see, it should say something like this:

stored: 3 boxes - room 8 - shelf 3

Instead it says:

stored: 3 boxes - 8 - shelf 3

Combobox2 changes after updating combobox1... now, you see I only get the ID no. I've given to the so called value "room 8". I don't want to use IIf functions so users with even less Access-knowledge than me can easily add more "rooms" without updating the entire (and enormous!) unbound textfield in the report.

So... is there a way around?

Thanks for the help
 
Rienk

You need to use DLookup using the value in the combobox that returns the ROOM 8 value.

The help file on DLookup is very detailed and should get you through this. Just replace

& [linkedcombobox1] &

with

& THE DLOOKUP FORMAT &

and you should work.

Jim

"Get it right the first time, that's the main thing..." [wavey]
 
This should be a little clearer.


DLookup("[Room#]", "tblRooms", "[RoomID] = " & [linkedcombobox1])

I took the liberty of assuming table and field names, but this is what I meant by "THE DLOOKUP FORMAT".

Jim

"Get it right the first time, that's the main thing..." [wavey]
 
*Happy*
It works perfectly! Thank you!
 
Glad to help out!

Jim

"Get it right the first time, that's the main thing..." [wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top