"Lookup field" in Reports

  • Thread starter Thread starter Robin Hickman
  • Start date Start date
R

Robin Hickman

I have two combo box questions, I'll post in separate messages. This is
the first:

I have a combo box on a form that gets it's choices from a table. when I
include that field in a report, it only displays the ID number from the
lookup table, not the choice itself. how do I fix that?

Thanks,
Robin
 
Base the report on a query that has both tables. Link the tables on the
appropriate field. Choose the description field from the other table to be
returned by the query (along with the other fields that you need) and bind
the textbox in the report to this description field. You will probably still
need to include the ID field in the report if you are using it as a
filtering value. However, it could be bound to a hidden (Visible = No)
textbox so that it isn't seen.
 
Thanks! That's what I thought too, but when I had tried to do that in my
query, I was getting an error that says "Type mismatch in JOIN
expression". I finally figured out that the field that the lookup combo
field was based on was a text type even though it appeared to only
contain numbers. I changed it to a number type and it seems to be
working now. the combo box seems to work the same regardless of whether
or not the field that it is based on is text type or numeric type,
which I find somewhat surprising.

Thanks,
Robin
 
Back
Top