S
sgbotsford
I'm starting to have a real appreciation for access, but I'll admit
there are some frustrations. I'm trying to figure out how to repeat a
similar action without having to create and save dozens of similar
queries.
I have a small database with a thousand locations in it. Each location
has GPS coordinates. Each location is assigned a zone.
For use with the GPS, I want to write out each zone as a text file in
suitable format for my mapping program. At this point the only way
I've been able to figure out how to do this is to write a bunch of
querries.
Querry_A
Create a querry, where Zone is like "A"
Querry_B
Create a querry where zone is like "B"
....
Then create a macro that uses TransferText for each query. This is
tedious.
How do I create a loop construct? In psuedo code what I want to do is
this:
foreach zone (A..Z) {
Select from Table GPS where GPS!Zone = $Zone output to table temp
TransferText temp , comma_delimited, $Zone.txt
TransferText temp, excel, $Zone.xls
}
This is a siimplification. I want different fields for the excel
spreadsheet than for the text file, but this illustrates what I'm
trying to do.
I think this can all be done in visual basic (A language I don't speak
yet...) and hence I should be able to do this entirely within access,
but I can''t figure out the hooks.
I need pointers to how to perform iteration in access.
there are some frustrations. I'm trying to figure out how to repeat a
similar action without having to create and save dozens of similar
queries.
I have a small database with a thousand locations in it. Each location
has GPS coordinates. Each location is assigned a zone.
For use with the GPS, I want to write out each zone as a text file in
suitable format for my mapping program. At this point the only way
I've been able to figure out how to do this is to write a bunch of
querries.
Querry_A
Create a querry, where Zone is like "A"
Querry_B
Create a querry where zone is like "B"
....
Then create a macro that uses TransferText for each query. This is
tedious.
How do I create a loop construct? In psuedo code what I want to do is
this:
foreach zone (A..Z) {
Select from Table GPS where GPS!Zone = $Zone output to table temp
TransferText temp , comma_delimited, $Zone.txt
TransferText temp, excel, $Zone.xls
}
This is a siimplification. I want different fields for the excel
spreadsheet than for the text file, but this illustrates what I'm
trying to do.
I think this can all be done in visual basic (A language I don't speak
yet...) and hence I should be able to do this entirely within access,
but I can''t figure out the hooks.
I need pointers to how to perform iteration in access.