Koristi funkciju koja datum konvertuje u format 'mmddyy', jedini koji Access prepoznaje u kodu. Ne moras da menjas international settings, datumi na formama i reprotima ce se i dalje pojavljivati kao dd-mm-yyyy, samo kad koristis kod, idi kroz ovu funkciju:
Code:
Function SQLDate(varDate As Variant) As String
'Purpose: Return a delimited string in the date format used natively by JET SQL.
'Argument: A date/time value.
'Note: Returns just the date format if the argument has no time component,
' or a date/time format if it does.
'Author: Allen Browne.
[email protected], June 2006.
If IsDate(varDate) Then
If DateValue(varDate) = varDate Then
SQLDate = Format$(varDate, "\#mm\/dd\/yyyy\#")
Else
SQLDate = Format$(varDate, "\#mm\/dd\/yyyy hh\:nn\:ss\#")
End If
End If
End Function
Umesto
="U periodu od " & [Od Datuma] & ". do " & [Do Datuma] & "."
treba ti nesto kao
Docmd.OpenReport ReportName:="Tvoj Report",view:=acpreview, WherCriteria:= "BETWEEN " & SQLDate([Od Datuma]) & " AND " & SQLDate([Do Datuma] )
Sve ima slepo objasnjeno ovde
http://allenbrowne.com/ser-36.html