Importing table data from other databases (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:35
Joined
Feb 19, 2002
Messages
31,957
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
Today, 13:35
Joined
Oct 29, 2018
Messages
15,231
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
Today, 15:35
Joined
Feb 28, 2001
Messages
20,010
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