when regional setting set to dd/MM/yyyy the date i pickup is not
collectly, if regional setting set to MM/dd/yyyy then all
is fine? how to set the date dd/MM/yyyy in correct way?
database: access
dt = date/time
my code here
Private Sub Form_Load() DTPicker2 = Date DTPicker3 = Date End Sub
Private Sub ViewReport_Click()
On Error GoTo 0
If MsgBox(" View Report?", vbYesNo, "View Report") = vbYes Then
DataReport1.Orientation = rptOrientLandscape
DataEnvironment1.Commands(1).CommandText = "Select * From Daily Where Dt Between #" & DTPicker2 & "# and #" & DTPicker3 & "# Order by Dt"
DataReport1.Show
End If
Load DataEnvironment1
With DataEnvironment1
If .rsCommand1.State <> 0 Then .rsCommand1.Close
.Command1
End With
End Sub

New Topic/Question
Reply



MultiQuote




|