Report works only if data in subform ?

S

SpookiePower

I have a mainform that shows name and adress of a customer.
On this form I also have a subform, that shows some other info
about the current customer.

I have made a report, and in the Report header, the name and
adress of the custtomer is displayed. In the Detail-section of the report,
I display the info from the subform placed on the main form.

My problem is that my report is empty in all the fields, if the
customer does not have any data in the subform. If the customer
have some data in the subform, both the content from the form
and subform is displayed on the report. How can this be ???
 
D

Duane Hookom

I expect you need to change the join in your report's record source to one
that includes all records from your un-named main table.
 
S

SpookiePower

Duane Hookom said:
I expect you need to change the join in your report's record source to one that includes all records from your un-named main table.

This is a short version of my long sql that I use in the report.
SELECT table01.adress, table02.otherdata FROM tabel01 INNER JOIN tabel02 ON tabel01.id=tabel02.id;

table01 contains all my customers tabel02 contain other data about the customer.

I just tryed it again and it seems to me, that it only will select customers that have data in table02.
But I also need to select customers that do not have data in table02.
How can this be done ?
 
D

Duane Hookom

In the design view of your report's record source, you will see a join line
between the tables. Double-click this line to display the join properties.
Look at the options and re-read your most recent response to find your
answer.
 
S

SpookiePower

Duane Hookom said:
In the design view of your report's record source, you will see a join line between the tables. Double-click this line to display
the join properties. Look at the options and re-read your most recent response to find your answer.

Thanks a lot. It seems to me that it might be a Outer join insted
of a Inner join. But I will test it later today.
 

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