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 ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / August 2006

Tip: Looking for answers? Try searching our database.

Trouble setting up import actions - Help!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Slez - 24 Aug 2006 19:00 GMT
I posted the question below in the Queries group but have not yet received
any feedback.  I'm trying to import data from another database via an append
query.  It seems this is the logical method, but having never done this, I am
starting out struggling a bit.  Please read my previous post.  Feedback is
greatly appreciated!!

- Previous post -
I have never used an append query, but need to import multiple fields across
4 tables from another database.  Based on some previous postings, I have
determined that I will create a macro to first link tables using the
TransferDatabase action, then run an Append Query to pull gather the desired
data and add it to the destination tables, then run the DeleteObject Action
to eliminate the links.  All of the properties of the destination tables
match the source database as they are required to.

Because I have never created an append query, I tried to create the query
with just 2 fields.  In design view, I added the linked table, which renamed
itself from "Project" in the source database to "qryImport1" in the
destination database.  From that I selected 2 fields:  JobNumber and
ProjectName.  The field names are the same in both databases.  When I
selected Append Query and the Append To box popped up, I selected my
destination table which is called "tblProject".

So down below in the design grid I show the following 2 fields:

Field:  JobNumber
Table:  qryImport1
Sort:
Append To:  JobNumber
Criteria: "065812"  (This is the JobNumber that I want the recordset for.  I
will be referencing a control on a form eventually.)

Field:  ProjectName
Table:  qryImport1
Sort:
Append To:  ProjectName
Criteria:

When I view the query in datasheet view or run it, the JobNumber data reads
065812 as it should, but I get "tblProjectProjectName" as the data in the
ProjectName field.

What might I be doing wrong?
Thanks in advance for any help!
John Nurick - 24 Aug 2006 21:45 GMT
Switch the query into SQL view and copy the SQL statement, then paste it
into your reply to this.

>I posted the question below in the Queries group but have not yet received
>any feedback.  I'm trying to import data from another database via an append
[quoted text clipped - 40 lines]
>What might I be doing wrong?
>Thanks in advance for any help!

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
Slez - 25 Aug 2006 13:18 GMT
Thanks for the reply!  Here is the SQL

INSERT INTO tblProject ( JobNumber, ProjectName )
SELECT qryImport1.JobNumber, qryImport1.ProjectName
FROM qryImport1
WHERE (((qryImport1.JobNumber)="065812"));

Slez

>Switch the query into SQL view and copy the SQL statement, then paste it
>into your reply to this.
[quoted text clipped - 9 lines]
>
>Please respond in the newgroup and not by email.
John Nurick - 25 Aug 2006 14:54 GMT
I can't see anything in that SQL statement that might cause problems. Next
thing is to look at qryImport1. That's a strange name to give a table: are
you sure it isn't a query?

If it *is* a query, post back with its SQL - or try linking it again.

If it really is a linked table, open it in datasheet view and compare it
with the source table in the other database. Are there any differences?

> Thanks for the reply!  Here is the SQL
>
[quoted text clipped - 20 lines]
>>
>>Please respond in the newgroup and not by email.
Slez - 25 Aug 2006 15:43 GMT
The qryImport1 came from the Destination argument(?) in a macro.  I think
that may be causing this problem.  I'm going to start from scratch with the
link/import and see how it goes.  You may see more posts next week.
Thanks for your help!

>I can't see anything in that SQL statement that might cause problems. Next
>thing is to look at qryImport1. That's a strange name to give a table: are
[quoted text clipped - 10 lines]
>>>
>>>Please respond in the newgroup and not by email.
 
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



©2010 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.