J
Jackie24
I am fairly new at working with code.
I am trying to write a statement that will open one report if a feild is true,
and another if it is False. This is what I have so far
Dim stDocName As String
Dim strCriteria As String
strCriteria = "[Event Name]='" & Me![Event Name] & "'"
If ([Cash Calculations].[NewEvent] = Yes) Then
DoCmd.OpenReport NewEvntCashCalc, acViewPreview, , strCriteria
Else
DoCmd.OpenReport PrevEvntCashCalcu, acPreview, , stCriteria
End If
When I try to run this code I get the Error Message
"Microsoft Access Can't Find Field "|" Referred to in your Expression"
Can anyone help me with this problem
I am trying to write a statement that will open one report if a feild is true,
and another if it is False. This is what I have so far
Dim stDocName As String
Dim strCriteria As String
strCriteria = "[Event Name]='" & Me![Event Name] & "'"
If ([Cash Calculations].[NewEvent] = Yes) Then
DoCmd.OpenReport NewEvntCashCalc, acViewPreview, , strCriteria
Else
DoCmd.OpenReport PrevEvntCashCalcu, acPreview, , stCriteria
End If
When I try to run this code I get the Error Message
"Microsoft Access Can't Find Field "|" Referred to in your Expression"
Can anyone help me with this problem