I am using following code to open a report for the people who have already been entered with the help of date of birth. But the format of date dd/mm/yyyy is automatically converted into mm/dd/yyyy, even my regional setting of the computer is not that of US. will appreciate if the code is amended to show the short format of date as dd/mm/yyyy. thanks.
Code:
Private Sub dob_BeforeUpdate(Cancel As Integer)
If DCount("*", "maintable", "[dob]=#" & Me.dob & "#") > 0 Then
MsgBox "There are other Employees with that dob. Here is a list.", vbOKOnly, "Multiple Employees Same DOB"
DoCmd.OpenReport "maintable", acViewPreview, , "[dob]=#" & Me.dob & "#"
End If
End Sub