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 Chris 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 get text in report instead of ID# 1

Status
Not open for further replies.

TBOB

Technical User
Jun 22, 2002
65
US
I have a form that uses lookup table to select a "radioname" via a combo box. The selected "radioname" is stored in my table as the ID number (from the lookup table) for that particular "radioname". The selected "radioname" shows on my form as the text name (a different field in the lookup table) for "radioname". This is fine. When I print my report that includes the "radioname", it's control source is the field in the table that has the ID# stored in it and that's what I get. Makes sense. What I'm looking for is how to get the text name (like what is on my form) of the "radioname" I selected on my report instead of the ID#?
 
Copy the field and change the source to the correct field. If it isn't available add it to the reports query

Once it's working hide the ID# field Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
That worked for the first cbo but I have a total of 5 to make it happen to. When I tried it on more than one they all came up with the same thing. Any other tips would be appreciated.

Thanks,

Tony
 
Are you able to send me a copy?

Check the file size File, Database Properties, GeneralTab

If it's big Click Tools, Database Utilities, Compact and repair.

Assuming it is under 1MB and you are happy to send me a copy or a cut down copy and I will take a look at it

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Why not do a select case statement that converts the numbers into the words you want? Put an unbound text box on your report, and insert code into your on print event prodecure.

Case 1
If txtRadio= "1" Then
txtUnbound.Value="(Fill in value)"

Case 2
If txtRadio="2" Then
txtUnbound.Value="(Fill in value)"

Linda Adams
Linda Adams/Emory Hackman Official Web site Official web site for actor David Hedison:
 
Neil,

The DLookup solution works great! Thanks for the timely response also.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top