Hi guys
I have to build reports in excel and print it out when access form button is pressed.
The data is transferred to excel in the following way:
Now when print button is pressed then the excelsheet comes up with the above statement. I want to print it out on the printer and close it automatically.
Can anyone please provide me vba code for this.
Regards
AMan
I have to build reports in excel and print it out when access form button is pressed.
The data is transferred to excel in the following way:
Code:
DoCmd.OutputTo acOutputQuery, "qrytemp", acFormatXLS, "C:\Documents and Settings\Amanpreet Kaur\arrivalsheet.xls", True
Now when print button is pressed then the excelsheet comes up with the above statement. I want to print it out on the printer and close it automatically.
Can anyone please provide me vba code for this.
Regards
AMan