Can you reference a single entry from a single field in an access query using vba? -
i trying learn vba system developing company work for. however, has been steep learning curve. specifically, want automate series of ms access 2013 reports rather key in new id# report each time want send out.
i can pull list of id# need reports query, wondering if there way vba sequentially walk through each record, assign id# variable (and/or put in unbound control in form controls report), , produce pdf of report (eventually i'd auto-email report well.
really, ton me do, save countless hours in future if successful. far, can print out report pdf vba, have key in data form, , isn't saving time.
any ideas great. new vba.
thanks.
there should plenty of examples of code dao database.openrecordset() , recordset.movenext loops on net.
try creating global idno variable (a public or friend variable in database module header) , id() function in database module returns value of idno variable, , using function in report's query filter records.
for each loop through recordset, assign appropriate datum idno global variable, , execute docmd.openreport.
you should 1 report each record in recordset, filtered on id.
Comments
Post a Comment