
Help with Multilple Selection Formula Problem
When I run my app with the following Criteria in the Selection Formula I get
a
Run Time Error 13 Type Mismatch. This Criteria works when I enter it
directly
into the Selection Formula in Crystal and it works when I break each
criteria
out separately. However, when I stick them both together with an AND I get
the
error.
Dim RecSelect1 As String, RecSelect2 As String, strAuditDate As String,
Dim strBlank As String, RecSelect3 As String
strAuditDate = InputBox("Enter Audit Date As CCYY,MM,DD:", "Report by
Audit Date")
RecSelect1 = "{ADATA.DTAUDIT} =" & "Date(" & strAuditDate & ")"
strBlank = ""
RecSelect2 = "{ADATA.Comments}<> 'strBlank'"
RecSelect3 = RecSelect1 And RecSelect2
crysIndReport.SelectionFormula = RecSelect3
crysIndReport.Destination = crptToWindow
crysIndReport.Action = 1
I have tried this with other fields of the same format and I still get the
same
error. Do I have something wrong with my syntax in my AND.
Very much would appreciate your advice,
Thanks,
Gordy Frank