Hi
Can someone help me with a date problem.
We have recently upgraded to 2007. In 2003, all our dates were yyyy/mm/dd. In 2007, the regional settings for South Africa, is now dd/mm/yyyy . All the forms in the program are using this format. The problem now is: On the booking schedule, if you want to see who is in a particular room, you double click on the block and it will open a popup form with the relevant information.
The code on the booking schedule is:
stLinkCriteria = "HouseDetailID = " & HseID
stLinkCriteria = stLinkCriteria & " And Date = #" & BookedDate & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acWindowNormal
Now what happens is, if the day is < the 13th of the month, it will look for mm/dd/yyyy
If the date is >= 13th then it look for dd/mm/yyyy
Ie: if the block is for 1st March 2010, it will find a booking for 3rd January 2010, If the block is for 13th March 2010, it will correctly find the booking for that date.
The format on the schedule and the popup form are both dd/mm/yyyy.
Please help!!!
Lizba
Can someone help me with a date problem.
We have recently upgraded to 2007. In 2003, all our dates were yyyy/mm/dd. In 2007, the regional settings for South Africa, is now dd/mm/yyyy . All the forms in the program are using this format. The problem now is: On the booking schedule, if you want to see who is in a particular room, you double click on the block and it will open a popup form with the relevant information.
The code on the booking schedule is:
stLinkCriteria = "HouseDetailID = " & HseID
stLinkCriteria = stLinkCriteria & " And Date = #" & BookedDate & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acWindowNormal
Now what happens is, if the day is < the 13th of the month, it will look for mm/dd/yyyy
If the date is >= 13th then it look for dd/mm/yyyy
Ie: if the block is for 1st March 2010, it will find a booking for 3rd January 2010, If the block is for 13th March 2010, it will correctly find the booking for that date.
The format on the schedule and the popup form are both dd/mm/yyyy.
Please help!!!
Lizba