Thread: report problem
View Single Post
  #2  
Old April 29th, 2010, 06:25 PM posted to microsoft.public.access.reports
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default report problem

Tonkaplayer -

You can do this two ways. One is to adjust the query that the report is
based on (or set up a query if the report is based on a table). The other is
to look up the data from within the report.

If you want to adjust the query, then add the lookup tables to the design
grid and add the joins if they are not automatically there. (Note that if
the make or model fields can be left blank, then the joins must be outer
joins.) Then select the field from the lookup tables with the descriptions
of the make or model so they will be in your query. Now on the report, use
those fields rather than the numeric fields.

If you want to look up the names on the report (only use this if there
aren't too many), set the control source for the field to be something like
this (use your tablename, fieldnames):

=DLookup("CarMakes","CarMakeDescription","[CarMakeID] = " & [CarMakeField])

Do the same for the car model. Use the help on DLookup for this.

--
Daryl S


"tonkaplayer" wrote:

I have a database that tracks student parking stickers. The make and modle
of car is selected from a combo box that uses a table as its lookup ie.
users selects Ford in Make then in Modle the only see teh ford modles and
select one there. The make is stored in the studnet information as a number
ie 1 stands for Ford 23 for Toyota and so on. My question is when I create
report on the student table it displays the number in the make field not the
name of the make. How do I get it to refer back and pull the name of the
make? boy this rambles that happens when you are doing too many things at
once. I fyou understand please help. Keep it simple though.