Auto Mail of query results

B

Bassel

Hello
Is the following available in access.
1-At a certain time each day, a query will run.
2-The results of this query is emailed auto.

If it is available , how to do it.

Thank you and best regards
 
O

Ofer

About running the query in a certain time, use the windows schedular to run
an mdb, that will run the query, and then send the query resault using the
SendObject, you can Email the query as Excel file, or ..., check help on the
subject.


docmd.SendObject acSendQuery
,"QueryName",acFormatXLS,SendToAddress,,,Subject,Text
 
B

Bassel

Thank you for your answer.
I used the windows schedular, but it will open the database only. How to
make the query run auto when the database is opened.

Thank you
 
O

Ofer

Create a macro called Autoexec, and put the command to run the query into it.
When you will open the mdb it will automaticaly start the macro, so if you
want to open the mdb for design view hold the shift key down while opening
the mdb.
 
B

Bassel

Hello
I have a problem in using command line to open the database. It will ask for
logon name and password.
I tried C:\Database\Chem\EasyTrack.mdb /user bassel/pwd 1234
but the logon screen appeared.

Can you help me solve this problem
 
B

Bassel

Thank you
--
Bassel


Bassel said:
Hello
I have a problem in using command line to open the database. It will ask for
logon name and password.
I tried C:\Database\Chem\EasyTrack.mdb /user bassel/pwd 1234
but the logon screen appeared.

Can you help me solve this problem
 
Top