Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Using a union of a left and right join for subreport

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JoeA2006 - 30 Jun 2006 15:11 GMT
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.
Michel Walsh - 01 Jul 2006 13:39 GMT
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

>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
[quoted text clipped - 8 lines]
> add
> it back, for instance.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.