Query/rapport

M

madde

Hello,
I have a query/rapport question, I would really appreciate
if someone can help me. Thanks !

I have this table (table1)with bookings. Each booking is a record with
customer, bookingdate, bookingnumber,etc
I made a report of all the bookings. Like a summary of all the bookings,
grouped by date. There is several booking on each date.
I also have table2 and I want to link the two tables.
Each record in table2 contains ID, date, and name. So, for instance this
table is saying: Mr Jonson (name) is responsible for the booking on January
3rd(date)
Now, when I open the report (I have query behind it) based on table1, I want
to look in table2 for the name that has the same date as my group of dates in
the report. And put that name(from table2) in that group in the report.

ex
Table2
2004-06-07 Mr Jonsson
2004-01-02 Mr X

Report from Tabel1
2004-06-07 Responible: Mr Johnsson
CustomerA
CustomerB
CustomerC
2004-01-02 Responsible: Mr X
Customer D
Customer E

hope I explained this well
 
J

Jeff Boyce

Instead of basing your report on the table, base it on a query. Create a
new query that joins the two tables together, and include all the fields you
wish to see in your report. Now base the report on the query.
 
M

madde

I did base the report on a query. But when I add table2 the report gets
empty(?)
I want to pull the names from table2 and put them in the record in table1
where dates in table1 and table2 matches.

ex:
Report of Table1
Booking no. date Customer Name
1 2004-05-06 Mr x
2 2004-01-02 Mr s
3 2004-05-05 Mr z


Table 2
ID Date NAme
1 2004-05-05 Jonsson
2 2004-01-02 Smith
3 2004-05-06 eriksson

So, I want the name Jonsson from table2 go to booking number number 3 in the
report since the date matches. And Smith goes to booking number2 since the
date matches.

As soon as I add table2 in the query my report gets empty


"Jeff Boyce" skrev:
 
J

Jeff Boyce

Is there a chance one (or more) of your underlying table fields defined with
the "lookup" datatype?

Jeff Boyce
<Access MVP>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top