Serious Sam
New Member
- Joined
- Jan 19, 2005
- Messages
- 30
Hello,
I have copied a piece of code from the Time Billing template, adapted it slightly for my database, abut can't get it to work.
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "frmSummaryCriteria", , , , , acDialog, "rptTimeCards"
If Not IsLoaded("frmSummaryCriteria") Then
Cancel = True
End If
End Sub
When I open the report rptTimeCards, I want the frmSummaryCriteria to open.
Instead, on the bolded line above I get:
Compile Error: Sub or Function not defined
I must need to define something, but I can't work out what the Time Billing template has that I don't. The code I copied is:
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "Report Date Range", , , , , acDialog, "Clients Billings by Project"
If Not IsLoaded("Report Date Range") Then
Cancel = True
End If
End Sub
Any help much appreciated
I have copied a piece of code from the Time Billing template, adapted it slightly for my database, abut can't get it to work.
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "frmSummaryCriteria", , , , , acDialog, "rptTimeCards"
If Not IsLoaded("frmSummaryCriteria") Then
Cancel = True
End If
End Sub
When I open the report rptTimeCards, I want the frmSummaryCriteria to open.
Instead, on the bolded line above I get:
Compile Error: Sub or Function not defined
I must need to define something, but I can't work out what the Time Billing template has that I don't. The code I copied is:
Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenForm "Report Date Range", , , , , acDialog, "Clients Billings by Project"
If Not IsLoaded("Report Date Range") Then
Cancel = True
End If
End Sub
Any help much appreciated