![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Every Monday I have to fill this parameter from date of last Monday to last Sunday. |
#3
| |||
| |||
|
|
i'm also not newbie to Access but i'm not programmer. I have a need to automate some task in Access. Every monday which is the first day of the week, I have to send a MS Excel file containing data which generated by MS Access. In my MS Access, I queries and filter a lot of data from Oracle database which I connect using ODBC. In this query, there is one perimeter need to fill up. The parameter is date. It's a range of date. Every Monday I have to fill this parameter from date of last Monday to last sunday. This is weekly data need to be emailed out to my user. Is there any mechanism to automate this task? |
#4
| |||
| |||
|
|
ami'n wrote: i'm also not newbie to Access but i'm not programmer. I have a need to automate some task in Access. Every monday which is the first day of the week, I have to send a MS Excel file containing data which generated by MS Access. In my MS Access, I queries and filter a lot of data from Oracle database which I connect using ODBC. In this query, there is one perimeter need to fill up. The parameter is date. It's a range of date. Every Monday I have to fill this parameter from date of last Monday to last sunday. This is weekly data need to be emailed out to my user. Is there any mechanism to automate this task? Start | Settings | Control Panel | Scheduled Tasks Create a standalone Access file (.mdb or .mde) Add a macro named 'autoexec' - it will execute when the Scheduled Task opens the file The autoexec macro will contain at least one TransferSpreadsheet statement to output your data to an Excel sheet, and a Quit command to close the system altogether. The TransferSpreadsheet statement will take as an input your query with the date parameters: WHERE DatePeriod Between (Date() - 1) and (Date() - 7) Note: the macro builder for TransferSpreadsheet says 'Table Name' but you can enter a SELECT query. Schedule this task to run anytime Monday, after 12:00:00am. |
![]() |
| Thread Tools | |
| Display Modes | |
| |