excel - Forms with vba code and importing -
how create access form has 2 fields importing 2 different excel files, , after selecting excel files press button run query (already exist) , automatically export query result in excel sheet. able create vba code (once played import dialog pop waiting user enter file path pops time second file, dialoge exporting result excel. problem how using forms in microsoft access.please give me suggestions or reference.
agree boeckm, question little lacking in detail :-)
if asking vba code fire macro's have create button , add following [on click] property
private sub excel_button_click(cancel integer) docmd.setwarnings false ' switch off "are sure" message dim stdocname string stdocname = "qry_import file 1" docmd.openquery stdocname, acnormal, acedit stdocname = "qry_import file 2" docmd.openquery stdocname, acnormal, acedit stdocname = "qry_export file 3" docmd.openquery stdocname, acnormal, acedit docmd.setwarnings true ' switch on "are sure" message end sub
you can build in single button using wizzard (select misc, run query , select first import query. go button , edit [embedded macro] adding others. can add set warning = off series if required).
Comments
Post a Comment