467,161 Members | 927 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Automating queries

Just started working in Access, and while I'm fairly confident in the
basics, or so I think, anything advanced doesn't work too well. I've
got a task I know should be easy to automate, but I don't know how to.
If someone could point me in the right direction it would be wonderful.

I've got 35 tables to create by running a query that filters a table
based on two criteria, and then names them based on the criteria used.

I have a table of the different combinations.
ie.
A 1
A 2
A 3
B 1
B 2
B 3
B 4
C 2
C 3
C 4
.... .and so on to the 35 diff combinations.

Each table would be named "A 1", "A 2", etc, and all the other data
appears, but the two filtered criteria dont.

This is ridiculously tedious, and while I'm happy in VBA in Excel, I've
never touched it in Access, is there any "easy" way of automating this?
(preferably without VBA, but if there isn't a way to do it wihtout VBA,
then please do post it).

Jun 21 '06 #1
  • viewed: 1397
Share:
4 Replies
I've got 35 tables to create by running a query that filters a table
based on two criteria, and then names them based on the criteria used.


STOP. Just base your queries on the table and then use them instead of
the table in whatever you're doing.

Jun 21 '06 #2
Do you absolutely have to create new tables? Could you not just use queries
in place of these filtered tables, or even a parameter query that asks you
for a letter and a number when you open it?
for example:
Select * from myTable where field1= [enter letter] and field2=[enter number]

"access-newb" <sm****@frink.nuigalway.ie> wrote in message
news:11**********************@r2g2000cwb.googlegro ups.com...
Just started working in Access, and while I'm fairly confident in the
basics, or so I think, anything advanced doesn't work too well. I've
got a task I know should be easy to automate, but I don't know how to.
If someone could point me in the right direction it would be wonderful.

I've got 35 tables to create by running a query that filters a table
based on two criteria, and then names them based on the criteria used.

I have a table of the different combinations.
ie.
A 1
A 2
A 3
B 1
B 2
B 3
B 4
C 2
C 3
C 4
... .and so on to the 35 diff combinations.

Each table would be named "A 1", "A 2", etc, and all the other data
appears, but the two filtered criteria dont.

This is ridiculously tedious, and while I'm happy in VBA in Excel, I've
never touched it in Access, is there any "easy" way of automating this?
(preferably without VBA, but if there isn't a way to do it wihtout VBA,
then please do post it).

Jun 21 '06 #3

John Welch (remove remove) wrote:
Do you absolutely have to create new tables? Could you not just use queries
in place of these filtered tables, or even a parameter query that asks you
for a letter and a number when you open it?
for example:
Select * from myTable where field1= [enter letter] and field2=[enter number]


I need seperate tables for these, as they are then used in different
programs that require that naming convention for all different tables.

Jun 21 '06 #4
"access-newb" <sm****@frink.nuigalway.ie> wrote in
news:11**********************@p79g2000cwp.googlegr oups.com:

John Welch (remove remove) wrote:
Do you absolutely have to create new tables? Could you not
just use queries in place of these filtered tables, or even a
parameter query that asks you for a letter and a number when
you open it? for example:
Select * from myTable where field1= [enter letter] and
field2=[enter number]


I need seperate tables for these, as they are then used in
different programs that require that naming convention for all
different tables.

No, you just need to name your queries according to the
requirements.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jun 21 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Limey Drink | last post: by
4 posts views Thread by Supa Hoopsa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.