Help with Searching Date

cooh23

Registered User.
Local time
Today, 14:52
Joined
Dec 5, 2007
Messages
169
Hello All,

I am trying to get the code below to search for dates but i can't seem to get it right, I know we have to include # before and after the date but i am not sure where to place it in the code.

The code below search for the minimum and maximum number of days.

Code:
  ' Check for Minimum Amount
    If Me.txtMinAmount > "" Then
        varWhere = varWhere & "[CheckAmount] >= " & Me.txtMinAmount & " AND "
    End If
    
    ' Check for Maximum Amount
    If Me.txtMaxAmount > "" Then
        varWhere = varWhere & "[CheckAmount] <= " & Me.txtMaxAmount & " AND "
    End If

Thank you,
 
The # goes before the " in front of the date variable and after the " behind the variable.
"[MyDate] = #" & VarDate & "#"
 

Users who are viewing this thread

Back
Top Bottom