runtime 13 data mismatch - SOLVED

thmsjlmnt3953

Registered User.
Local time
Today, 06:04
Joined
May 20, 2014
Messages
120
Hi,

I have used this code many time shwoever its failing on this occasion, the product in question is for example "0066551 - test product" which appears in the continuous form and the textbox.

Code:
Private Sub Command9_Click()
 Dim strWhere As String
    Dim lngLen As Long
    Const conJetDate = "\#mm\/dd\/yy\#"
    If Not IsNull(Me.txtStartDate) Then
        strWhere = strWhere & "([Request_Date] >= " & Format(Me.txtStartDate, conJetDate) & ") AND "
    End If
    If Not IsNull(Me.txtEndDate) Then
        strWhere = strWhere & "([Request_Date] < " & Format(Me.txtEndDate + 1, conJetDate) & ") AND "
    End If
    If Not IsNull(Me.txtProd) Then
        strWhere = strWhere & "([Product] < " & Format(Me.txtProd + 1, conJetDate) & ") AND "
    End If
    lngLen = Len(strWhere) - 5
        If lngLen <= 0 Then
Me.FilterOn = False
    Else
        strWhere = Left$(strWhere, lngLen)
        Me.Filter = strWhere
        Me.FilterOn = True
        Me.OrderByOn = True
        Me.OrderBy = "[Request_Date] DESC"
    End If
End Sub
 
Last edited:
Re: runtime 13 data mismatch

conjetdate - oops!! copy and paste error and fixed now!!
 

Users who are viewing this thread

Back
Top Bottom