By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,360 Members | 2,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,360 IT Pros & Developers. It's quick & easy.

importing tables

P: n/a
How can I change the name of a table as I import it?

I have a form in Access that needs to accept files from different
sources (mainly dBase III). I need one field out of these tables,
called ZIP, that I can run queries on. I want to import this Zip
field into a holding table to run the queries on. This will be a
frequent thing.

If I can empty my "holding table" before I import and then give the
imported file the same name every time, then the FROM clause in my
query could be the same for each import.

Somebody please tell me an easy way to do this.
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Brenda" <bb*******@yahoo.com> wrote in message
news:37**************************@posting.google.c om...
How can I change the name of a table as I import it?

I have a form in Access that needs to accept files from different
sources (mainly dBase III). I need one field out of these tables,
called ZIP, that I can run queries on. I want to import this Zip
field into a holding table to run the queries on. This will be a
frequent thing.

If I can empty my "holding table" before I import and then give the
imported file the same name every time, then the FROM clause in my
query could be the same for each import.

Somebody please tell me an easy way to do this.

Why bother to empty the table when you could simply delete the existing one?
And for that matter why import when you could simply link to the dBase
tables? You could run your queries from attched tables without importing at
all.
By the way, you don't mention if you are looking to do this with VBA coding
or simply using Access, and if via code, whether you have made any start on
this routine.
Nov 13 '05 #2

P: n/a
I will be doing this several times a week with different tables. If I
link them can they all have the same name so I can set the FROM field
in my query to a generic name? So far I have tried using VB code
(TransferDatabase). But I'm open to suggestions as to the best way to
handle this.

"Eric Schittlipz" <er**@schittlipz.com> wrote in message news:<cl**********@sparta.btinternet.com>...
"Brenda" <bb*******@yahoo.com> wrote in message
news:37**************************@posting.google.c om...
How can I change the name of a table as I import it?

I have a form in Access that needs to accept files from different
sources (mainly dBase III). I need one field out of these tables,
called ZIP, that I can run queries on. I want to import this Zip
field into a holding table to run the queries on. This will be a
frequent thing.

If I can empty my "holding table" before I import and then give the
imported file the same name every time, then the FROM clause in my
query could be the same for each import.

Somebody please tell me an easy way to do this.

Why bother to empty the table when you could simply delete the existing one?
And for that matter why import when you could simply link to the dBase
tables? You could run your queries from attched tables without importing at
all.
By the way, you don't mention if you are looking to do this with VBA coding
or simply using Access, and if via code, whether you have made any start on
this routine.

Nov 13 '05 #3

P: n/a

"Brenda" <bb*******@yahoo.com> wrote in message
news:37*************************@posting.google.co m...
I will be doing this several times a week with different tables. If I
link them can they all have the same name so I can set the FROM field
in my query to a generic name? So far I have tried using VB code
(TransferDatabase). But I'm open to suggestions as to the best way to
handle this.

"Eric Schittlipz" <er**@schittlipz.com> wrote in message

news:<cl**********@sparta.btinternet.com>...
"Brenda" <bb*******@yahoo.com> wrote in message
news:37**************************@posting.google.c om...
How can I change the name of a table as I import it?

I have a form in Access that needs to accept files from different
sources (mainly dBase III). I need one field out of these tables,
called ZIP, that I can run queries on. I want to import this Zip
field into a holding table to run the queries on. This will be a
frequent thing.

If I can empty my "holding table" before I import and then give the
imported file the same name every time, then the FROM clause in my
query could be the same for each import.

Somebody please tell me an easy way to do this.

Why bother to empty the table when you could simply delete the existing one? And for that matter why import when you could simply link to the dBase
tables? You could run your queries from attched tables without importing at all.
By the way, you don't mention if you are looking to do this with VBA coding or simply using Access, and if via code, whether you have made any start on this routine.


I was suggesting that rather than change the query, you change the
definition of the linked table. So before running the query, you delete the
linked table, then create a new linked table with the same name.
That way, you would always have a table called 'tblDbase' or whatever, and
that would be the name in the FROM clause of any query. Just each time you
re-cretae the link to point to the table you require.
If you have never experimented with linked tables, start with File>Get
External Data>Link Tables and from the 'Files of Type' dropdown at the
bottom select dBase III.


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.