I have a table with one field - zip and I want to take that data from the table, put it in an array and cycle the elements of the array.
What's the VBA syntax to do such?
I have a table with one field - zip and I want to take that data from the table, put it in an array and cycle the elements of the array.
What's the VBA syntax to do such?
Why do you need array? Why not a recordset and cycle through the recordset? Would have to do that anyway to populate the array.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Not sure....can you provide code to do as such?
Review http://allenbrowne.com/ser-29.html
See item 5 for looping.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
You may also see thjs tutorial.
Taking a look at the link you provided I see the following code
I am wanting to open that database and link a table (I have the VBA to import a table just have never done it this way before). Would my code go in the 'Rest of your code here since it doesn't matter what MyField is equal to?Code:Do while Not rst.EOF If rst![MyField] <> Something Then 'The real loop exit condition. Exit Do End If ' Rest of your code here. rst.MoveNext Loop
I have no idea if your code should go there because I have no idea what you are trying to accomplish.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.