Using a union of a left and right join for subreport

G

Guest

I am using a union query for a recordsource for a subreport. The union is
based on a left and right join. When I try to delete and add a record back to
the table (in this case it is a record in the query from the left join) the
queries are based on, the new record shows up but is not sorted correctly and
does not sum correctly. The sum only includes the amount of the new record.
It looks like I can edit the record OK, but I cannot delete it and then add
it back, for instance.
 
M

Michel Walsh

Hi,


You can add the record directly to the table, with an SQL statement, not
THROUGH the union query:


DoCmd.RunSQL "INSERT INTO table1 (f1, f2, f3) VALUES
(FORMS!form1!control1, FORMS!form1!control2, FORMS!form1!control3)"


You may have to requery the recordset to see the newly added record.

Hoping it may help,
Vanderghast, 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