Importing table data from other databases (1 Viewer)

The Rev

Registered User.
Local time
Yesterday, 19:01
Joined
Jan 15, 2003
Messages
118
Hi. Did you implement the change I suggested earlier?
I have no idea what listbox you are referring to in your code.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:01
Joined
Feb 19, 2002
Messages
43,257
It sounds like you are looking for someone to code this for you. It would be a wasteful undertaking for any expert to do this for free without a clear spec.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:01
Joined
Oct 29, 2018
Messages
21,467
I have no idea what listbox you are referring to in your code.
Oops, I guess I misread your code. So, if you used it without any modification, what happened?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 18:01
Joined
Feb 28, 2001
Messages
27,172
Take a look at this article that allows you to select data from a specific file:


I will take a "divide and conquer" approach here, breaking down the steps because you have indicated that you are less experienced than you would like to be. (Don't we ALL wish for being better?...)

You would have to first create a query to select what you want from the external table. That is where the "IN" clause specifies the location. You would probably be able to make it a "parameter" query in which the file in question was the parameter. Which means it can be a stored query but you then have to assign the parameter value before you actually use it.


Next, build a query to do your INSERT INTO table (fields) SELECT fields FROM the "external select" query.

If there is anything else to do based on other action queries, just base them on JOINs with that query (for UPDATE queries) or the "NOT IN" method for DELETE queries.

Just remember that Access doesn't care if the recordset is a table or a query that returns records. So build the "external select" query and use it as though it is a table. Just declare the parameters in the query, then when you are ready to use that query, load a value to the parameter(s) and go your merry way.
 

Users who are viewing this thread

Top Bottom