Hi,
I have a purchase order database, with two tables that are linked via PONum
field. On my form I have a print button that prints the current record on
screen, with the following Event Code.
stDocName = "Rpt-POs"
DoCmd.OpenReport stDocName, acPreview, , "[PONum]='" & Me![PONum] & "'"
My problem is that it prints ok if there are records in the sub table,
however, if there is no records in the subtable, the main record does not
print. I get "Error messages. Can anyone help?
Rick Brandt - 24 Sep 2007 19:32 GMT
> Hi,
> I have a purchase order database, with two tables that are linked via
[quoted text clipped - 8 lines]
> however, if there is no records in the subtable, the main record does
> not print. I get "Error messages. Can anyone help?
You need to change the join used in the query from an INNER join to an OUTER
join. If you double-click the existing join line the dialog that pops up is
pretty self-explanatory.

Signature
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Ty Archer - 24 Sep 2007 21:16 GMT
Thanks very much. It works great!
> > Hi,
> > I have a purchase order database, with two tables that are linked via
[quoted text clipped - 12 lines]
> join. If you double-click the existing join line the dialog that pops up is
> pretty self-explanatory.