[AccessD] Filtering with International Dates

Rocky Smolin rockysmolin at bchacc.com
Thu Sep 22 13:36:37 CDT 2011


Dear List:
 
Because I'm old and can't remember (and the archives are down), I was told
how to filter with dates so that if a user is using international dates it
doesn't matter.
 
The following code:
 
    If Nz(Forms!frmPOReport!txtGEPromisedDate) <> "" Then
        If Len(strSQL) <> 0 Then strSQL = strSQL & " AND "
        strSQL = strSQL & "fldPOPromisedDate >= #" &
Forms!frmPOReport!txtGEPromisedDate & "# "
    End If
    
    If Nz(Forms!frmPOReport!txtLEPromisedDate) <> "" Then
        If Len(strSQL) <> 0 Then strSQL = strSQL & " AND "
        strSQL = strSQL & "fldPOPromisedDate <= #" &
Forms!frmPOReport!txtLEPromisedDate & "# "
 
strSQL eventually ends up in Me.Filter.
 
Works good in the USA.  :) Fails in Nicaragua. :(
 
Was it CDate I was supposed to use?
 
Sorry for the redux.
 
TIA
 
Rocky
 



More information about the AccessD mailing list