Using recordsets in a Report

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

Guest

My problem is printing, in one line in a report, data from four tables (all
in one database). Data from three will always be used, but the fourth would
only be used if there is a record. I want the line containing the data from
the first three tables printed whether or not there is a record in the fourth
table. I have not be able to find a way to do that. Using built in
functions, the data will only print if there is data in the fourth table. It
seems that access will only allow OUTER JOIN only if you have two tables - no
more.

The way I thought about was to write in the open_report sub that gets the
data from the first three tables and if a certain field in the third table is
true, get the data from the fourth. I need also to place dates into certain
"columns" based on the third table (this can be up to ten) for the row. I do
this by placing the data into a global variables (arrays). This works except
that I can't find a way to then print this info into the report.

Any suggestions.

John H W
 
John. It sounds like the problem is in the way you contstructed the query.
Set the relationship in the query so that all records from the first three
tables show but only those from the fourth table if there is a record.
I am not sure how familiar you are with doing that, so, if you open the
query in design view, you have set the relationship of the first three
tables, now you can right click on the line that represents the relationship
with the fourth table, this will open a relationship window, now select the
desired relationship.

Hope this helps.
Fons
 
Back
Top