[AccessD] Changing the table in a query so I can loop through thequery

Developer Developer at UltraDNT.com
Sat Apr 17 16:02:18 CDT 2004


Susan:
Rather than use the query def, paste the sql in the query into your
code, and then do something like:

For i = 1 to 71
   currentdb.execute "insert into " & i & " whatever the rest of the sql
is ...
Next i 

Hth
Steve





-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Klos, Susan
Sent: Saturday, April 17, 2004 3:16 PM
To: 'AccessD at databaseadvisors.com'
Subject: [AccessD] Changing the table in a query so I can loop through
thequery


I have an append query that can work for 71 tables.  I want to create a
for next loop function that will substitute the table names (they are
numbers) each time it loops.  Can someone help me?  I do not quite have
the query def thing down and I think I need to use it here.  Each table
has the same fields.

 

Susan Klos

Senior Database Analyst

Evaluation and Reporting

Florida Department of Education

 

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list