vba - Get Query Results in a String -


if run query select 3 seperate fields each record. possible results each returned in 3 separate strings (one each field) can cycle through them in vba code?

yes, can try opening recordset , accessing field values collection.

dim d dao.database dim r dao.recordset set d = currentdb() set r = d.openrecordset("sql or tablename") while not r.eof     debug.print r!field1, r!field2, r!field3     r.movenext wend r.close set r = nothing set d = nothing 

Comments