Date Range Problem

m17347047711116

Registered User.
Local time
Today, 16:23
Joined
Feb 4, 2002
Messages
68
I am using the following code to print a report based on a date range:
Problem is that to get the date range that i want i have to enter the start date as mm/dd/yy and the end date as dd/mm/yy
Can anyone tell me what is wrong with the code would like to enter start and end dd/mm/yy

Private Sub OK_Click()
If IsNull(Me.StartDate) Or IsNull(Me.EndDate) Then
MsgBox "Both dates are required"
Else
DoCmd.OpenReport "Employees Vacations Query Report", , , "Between #" & Format(Me.StartDate, "mm\/dd\/yyyy") & "# And #" & Format(Me.EndDate, "mm\/dd\/yyyy") & "#"
End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom