J
jo
Hi i need some code to add to code I already have that can automactically
enter the password so that i can create reports that is schudeled on a weekly
basis: This is my code that i have when I did not have a password on the form:
'------------------------------------------------------------
' checker_Query_overdue
'
'------------------------------------------------------------
Function checker_Query_overdue()
On Error GoTo checker_Query_overdue_Err
If (DCount("*", "OnOpenOverdue") > 0) Then
DoCmd.OpenReport "OnOpenOverdue", acPreview
DoCmd.OutputTo _
acOutputReport, , acFormatSNP, _
Application.CurrentProject.Path & "\Overdue.snp", False
DoCmd.Close acReport, "OnOpenOverdue", acSaveNo
Call SendNotesMail("Gauge Control", _
Application.CurrentProject.Path & "\Overdue.snp", _
"StandardRoomGuys", "Gauges Overdue", False)
DoCmd.Close acReport, "Overdue.snp", acSaveNo
Else
Exit Function
End If
Application.Quit
checker_Query_overdue_Exit:
Exit Function
checker_Query_overdue_Err:
MsgBox Error$
Resume checker_Query_overdue_Exit
End Function
enter the password so that i can create reports that is schudeled on a weekly
basis: This is my code that i have when I did not have a password on the form:
'------------------------------------------------------------
' checker_Query_overdue
'
'------------------------------------------------------------
Function checker_Query_overdue()
On Error GoTo checker_Query_overdue_Err
If (DCount("*", "OnOpenOverdue") > 0) Then
DoCmd.OpenReport "OnOpenOverdue", acPreview
DoCmd.OutputTo _
acOutputReport, , acFormatSNP, _
Application.CurrentProject.Path & "\Overdue.snp", False
DoCmd.Close acReport, "OnOpenOverdue", acSaveNo
Call SendNotesMail("Gauge Control", _
Application.CurrentProject.Path & "\Overdue.snp", _
"StandardRoomGuys", "Gauges Overdue", False)
DoCmd.Close acReport, "Overdue.snp", acSaveNo
Else
Exit Function
End If
Application.Quit
checker_Query_overdue_Exit:
Exit Function
checker_Query_overdue_Err:
MsgBox Error$
Resume checker_Query_overdue_Exit
End Function