J
Jeannie M
This code fails at run time with the error shown following the code.
Dim strX as String
strX = [Forms]![Reports Dialog]![Combo62]
MsgBox strX
intNumJudges = DMax("NumJudges", "Fees", "[Event] = " & strX)
Syntax error (missing operator) in query expression ’[Event] = Best
Appaering’.
This code works fine WHY the error?
Dim strX As String
strX = [Forms]![Reports Dialog]![Combo62]
MsgBox strX
intNumJudges = DMax("NumJudges", "Fees", "[Event] = [Forms]![Reports
Dialog]![Combo62]")
I have other much more complex code that works and I have compared several
samples such as the one below but I still can’t see the problem. Am I
loosing my mind??
Public Function fncAgeGroup(strField As String, strTable As String,
strCriteria As String, intFormAge As Integer)
On Error GoTo Err_fncAgeGroup
fncAgeGroup = DLookup(strField, strTable, _
strCriteria _
& " AND (Min<=" & intFormAge & ")" _
& " AND (Max>=" & intFormAge & ")")
Any help appreciated
Dim strX as String
strX = [Forms]![Reports Dialog]![Combo62]
MsgBox strX
intNumJudges = DMax("NumJudges", "Fees", "[Event] = " & strX)
Syntax error (missing operator) in query expression ’[Event] = Best
Appaering’.
This code works fine WHY the error?
Dim strX As String
strX = [Forms]![Reports Dialog]![Combo62]
MsgBox strX
intNumJudges = DMax("NumJudges", "Fees", "[Event] = [Forms]![Reports
Dialog]![Combo62]")
I have other much more complex code that works and I have compared several
samples such as the one below but I still can’t see the problem. Am I
loosing my mind??
Public Function fncAgeGroup(strField As String, strTable As String,
strCriteria As String, intFormAge As Integer)
On Error GoTo Err_fncAgeGroup
fncAgeGroup = DLookup(strField, strTable, _
strCriteria _
& " AND (Min<=" & intFormAge & ")" _
& " AND (Max>=" & intFormAge & ")")
Any help appreciated