display combo box value?

romanticode

Registered User.
Local time
Today, 20:47
Joined
Oct 26, 2007
Messages
39
i have table :

code name
aa 1234
bb 5678

i use the table on a combo box in form, the display value on combo box is "name" but the combo box use "code" to generating result.

How can i put both value on text box on report? i'll use it as title. so on report will be shown as " nama (code) ", for exam; 1234 (aa) ?

thanks
 
Have you tried using a new text box where the Control Source is a DLOOKUP from your table? e.g. =DLOOKUP("
","Code","[Name] = [ListBox.value]")

You may have to play with the syntax a little to get this right for you but essentially you are looking back at the table to pull through a value based upon another value in the same row of that table.
 
Base the Report on a Query to which the lookup table has been added, seleect the Name field in the query instead of the ID
By the way it's not a good idea to have a field called Name since it's a reserved word in Access
 

Users who are viewing this thread

Back
Top Bottom