How about something like this…
Dim rs As RecordSet
Set rs = Currentdb.OpenRecordSet("SELECT PictureLocation, ID FROM MyAccessTable;")
Do While Not rs.EOF
Debug.Print rs("PictureLocation") & " - " & rs("ID")
rs.MoveNext
Loop
More Related Contents:
- How does one decompile and recompile a database application?
- What are the rules governing usage of parenthesis in VBA function calls?
- Autonumber value of last inserted row – MS Access / VBA
- Code to loop through all records in MS Access
- Bang Notation and Dot Notation in VBA and MS-Access
- How do I force VBA/Access to require variables to be defined?
- VBA: Difference in two ways of declaring a new object? (Trying to understand why my solution works)
- How to diagnose MS access crashes
- Equivalent cURL in VBA?
- How do I access the selected rows in Access?
- Run-time error ‘3061’. Too few parameters. Expected 1. (Access 2007)
- Prevent enabling of shift bypass – Access 2010
- VBA procedure to import csv file into access
- Transform multiple rows into columns with unique key
- how to show query results in a datasheet in the same form?
- Access VBA: Find max number in column and add 1
- MS Access prepared statements
- Create sequential ID value based on the year that a record is added
- UrlDownloadToFile in Access 2010 – Sub or Function not Defined
- Null values for variables in VBA
- Using a centralized VBA module in multiple Access databases
- How to add a menu item to the default right click context menu
- VBA – Run Time Error 3271 using DAO object
- Trouble with InputBoxes
- Get Name of Current VBA Function
- How do I display a messagebox with unicode characters in VBA?
- Selecting 2 tables from 2 different databases (ACCESS)
- Linked table ms access 2010 change connection string
- Insert multiple records with a date range in MS Access
- MS Access VBA: Sending an email through Outlook [closed]