G
Guest
Hi,
I am a new user. As a first challenge I had, I wanted to perform an automated task. I wanted to open a parameter query automatically and have the results in excel.
I got helped by BILL who suggested me to do the following:
create the excel file on drive c:
DoCmd.TransferSpreadsheet acExport, 8, "myQuery", _
"C:\my documents\MyExcelFile.xls", False
I tried this and it worked fine.
My new challenge is to apply this to a text box on a form, where I can select the query and by a click on a command button I get the results automatically in the excel file. I am kind of confuse on how to relate the click selection to the name of the query.
Can you please help me with this?
Thanks
I am a new user. As a first challenge I had, I wanted to perform an automated task. I wanted to open a parameter query automatically and have the results in excel.
I got helped by BILL who suggested me to do the following:
create the excel file on drive c:
DoCmd.TransferSpreadsheet acExport, 8, "myQuery", _
"C:\my documents\MyExcelFile.xls", False
I tried this and it worked fine.
My new challenge is to apply this to a text box on a form, where I can select the query and by a click on a command button I get the results automatically in the excel file. I am kind of confuse on how to relate the click selection to the name of the query.
Can you please help me with this?
Thanks