displays ID instead of name on a Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
When I try to print a report from a combo box it displays the ID and not the name.Before I dump the info into the report I have it stored on a table that grabs all the info from my form(on the record source of the form)
My form has alot of information and someone suggested that I create a query that joins my tables, I am a little bit confused on the syntax because my form has alot of information that include more than two tables and queries.

Thanks in advance.
 
Hi there,
When I try to print a report from a combo box it displays the ID and not the name.Before I dump the info into the report I have it stored on a table that grabs all the info from my form(on the record source of the form)

It sound to me like you're yet another victim of Microsoft's
misdesigned, misleading, and infuriating so-called "Lookup Field". A
combo box in a Table conceals the actual content of the field - an ID
number - behind the looked-up value, making it tempting to use the
table directly in a Report; but the Report shows what's actually IN
THE TABLE, not what *appears* to be in the table.
My form has alot of information and someone suggested that I create a query that joins my tables, I am a little bit confused on the syntax because my form has alot of information that include more than two tables and queries.

Use a Query that joins the tables. Include (all of the) lookup
table(s) in the Query upon which the form is based, joining on the
lookup table's primary key to the lookup ID field. If you're assuming
that one query can have only two tables, fear not - for a
nonupdateable query like you want for a report, you can have dozens.
 
Add a new textbox to your form and set its Visible property to No. Set the
control source property of the textbox to:
=[NameOfTheCombobox].Column(1)

In your report, replace the combobox with the new textbox.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


P said:
Hi there,
When I try to print a report from a combo box it displays the ID and not the
name.Before I dump the info into the report I have it stored on a table that
grabs all the info from my form(on the record source of the form)
My form has alot of information and someone suggested that I create a query
that joins my tables, I am a little bit confused on the syntax because my form
has alot of information that include more than two tables and queries.
 
Thanks that's exactly my problem. I am a little bit confused about the syntax though!

Since I cannot see your database, do not know any of the table names
or anything about the structure of the database, I'm not really in a
position to help...

Can you just create a Query in the query builder? If you add the
lookup tables to the query window, Access should automatically create
the join lines. You'ld then select the lookup text fields from the
lookup table (rather than the ID fields from your main table). No
"syntax" would be involved.
 
Back
Top