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 / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Relationships in querries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sleepless In the Natti - 20 Dec 2007 15:01 GMT
I have an Accounts Receivable DB.  The information is fed to the DB by a
couple of text files that come from my companies internal system.  I have set
these files up as linked tables.  The linked table I am having problems with
right now is ARReport.  I have taken a look at the table and it contains the
right information but when I write a query I either get way to much info or
not enough.  Once I am able to get the right amount of info I need to change
it to an append query so that it will update the master table of tblArReport.

Tables - ARREPORT - Linked table with below fields
                              EIRef, Client #, Invoice #, Inv Date,
Advances, Other, Total.
           tblArReport - Master table that ARREPORT Feeds into.
                              EIRef, Client #, Invoice #, Inv Date,
Advances, Other, Total
                              Paid, Total Deposits

I have setup a Select query to find only the data from ARREPORT that I need
by setting criteria on Total to "Is Not Null".  The ARREPORT itself contains
some header info that I don't need to pull into the DB.

Run the query and all of the correct information is pulled.  Then I change
it to an append query and tell it to append to tblArReport.  Run the append
it says I am about to change 28 rows.  That is fine, click YES.  Then it
comes up with an error.  It cannot append all the records in the query.  28
records were not updated do to key violations.  Below is the SQL for this
query as an append query.

INSERT INTO tblArReport ( EIRef, [Client #], [Invoice #], [Inv Date],
Advances, Other, Total )
SELECT ARREPORT.EIRef, ARREPORT.[Client #], ARREPORT.[Invoice #],
ARREPORT.[Inv Date], ARREPORT.Advances, ARREPORT.Other, ARREPORT.Total
FROM ARREPORT
WHERE (((ARREPORT.Total) Is Not Null));
Dustin B - 20 Dec 2007 15:41 GMT
I figured this one out.  The linked table ARREPORT was pulling the original
table instead of the spot where the updates were going.

> I have an Accounts Receivable DB.  The information is fed to the DB by a
> couple of text files that come from my companies internal system.  I have set
[quoted text clipped - 29 lines]
> FROM ARREPORT
> WHERE (((ARREPORT.Total) Is Not Null));
 
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.