[AccessD] International date format problem

Paul Hartland paul.hartland at googlemail.com
Wed Aug 1 18:15:04 CDT 2012


Rocky,

Have you tried formatting the dates something like below:

rstSupply.FindFirst "OrderNumber = '" & Me.txtPONumber & " - " &
rstPODetail!fldPODLineNumber _
        & "' AND " & Format(DueDate, "mm/dd/yyyy") & "= #" _
        & Format(rstPODetail!fldPODDateRequired, "mm/dd/yyyy") & "# AND
PartNumber = '" _
        & rstPODetail!fldPODPartNumber & "'"

Rarely use access now, but sure I have used something similar in VB6, I
really must learn .NET

Paul

On 2 August 2012 00:06, Rocky Smolin <rockysmolin at bchacc.com> wrote:

> Dear List:
>
> I have the following line which works fine here with mm/dd/yyyy but does
> not
> work for my client in Mexico where the date format is dd/mm/yyyy:
>
>     rstSupply.FindFirst "OrderNumber = '" & Me.txtPONumber & " - " &
> rstPODetail!fldPODLineNumber _
>         & "' AND DueDate = #" _
>         & rstPODetail!fldPODDateRequired & "# AND PartNumber = '" _
>         & rstPODetail!fldPODPartNumber & "'"
>
>
> where fldPODDateRequired is Date/Time data type.  This is A2K3 BTW.  When
> date format is set in Windows to dd/mm/yyyy rstSupply.NoMatch=True, when
> date format is mm/dd/yyyy rstSupply.NoMatch = false (finds the record)
>
> I think I may have this problem in other places in the code.  Is there a
> general method to avoid this problem?
>
> MTIA
>
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.bchacc.com <http://www.bchacc.com/>
> www.e-z-mrp.com <http://www.e-z-mrp.com/>
> Skype: rocky.smolin
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



-- 
Paul Hartland
paul.hartland at googlemail.com


More information about the AccessD mailing list