I'm using Access 2007 connecting to a MS SQL db through ODBC. I have a table called 'bases' it looks like this:
Name ID Site
--------------------
Home 1 111
Work 2 111
Car 3 111
Castle 4 111
Store 1 222
Rest 2 222
Now the tricky part is that the only part of this table THAT WILL KNOW is Site.
I know I can do a DLookup and get the first record (Home,1) and store these in variables.
BUT I need to somehow get the next record (Work, 2) and store these in other variables and then loop though the table until I have every record while the Site is 111, stored in variables.
Any ideas?
The purpose of this is to save these returned values as strings and put them in a complicated Query eventually.