Can't assign values from query to array variable in Access -


i have query output cols date, type, value. need gather different dates variable can later create csv file each unique date. tried creating record set, , assigning values of date variable such:

sub getdates()     dim rst recordset     dim db database     dim arrdates variant      set db = currentdb     set rst = db.openrecordset("select date output group date; ")     arrdates = rst.getrows() 

but when do:

for each item in arrdates     debug.print (item) next 

i 1 date printed (11/01/2012). if run query in access, see 15 months.

i had specify number of rows: arrdates = rst.getrows(rst.recordcount)

a better solution, recommended remou:

do until rst.eof     debug.print rst!date     rst.movenext loop 

edit: reading wrong msdn help.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -