Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a automatic report in Access. 1

Status
Not open for further replies.
Mar 6, 2006
8
US
I am not sure how to do this of if I could I would like to run a report automatic based on a date in my database daily. I am trying to run a report to print all clients in database 45 days before they expires. Letting me know these people is about to expire.
I need to know how to start this off and where do I start it from.
 
donald5756,
do you already have the report written?
if so you could look at opening access with a parameter that tells it to run the report.
i did this a few years back so don't really remember how i set it up but i can try to recreate it if you need.
regards,
longhair
 
yes the report is created already I have the report pulling the information I need. Just do not know how to run it. if you could remember how to do I this will be a big help. Thanks
 
donald5756,
1st look at access help - search for startup - then look for 'command line options'.
basically what i did was:
create a module called 'CheckCommandLine'
Code:
Function CheckCommandLine()
    If Command = "yourcommandline" Then
        DoCmd.RunMacro "yourprintmacro"      
    Else
    DoCmd.Maximize
    DoCmd.OpenForm "Main Menu", acNormal, "", "", , acNormal
    SendKeys "%q", False
    End If
End Function
created an autoexec macro with the following:
maximize
echo set to yes
hourglass set to yes
openmodule module name set to CheckCommanLine
procedure name set to CheckCommandLine
send keys keystrokes set to {F5}
wait set to no
hope this helps.
regards,
longhair
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top