I have a continuous form that initially opens showing all records from a table called DESPATCH_HEADER. In the form header are four combo boxes (TargetDespatchDate, SiteCode, Squad, LoadPoint) that are used to narrow down the records displayed by this continuous form.
BUT, I'm having problems with the TargetDespatchDate combo box; it seems that the SQL statement behind the AfterUpdate event is attempting to convert the date to American format. For all dates that are above the 12th of the month, the statement resolves fine, but in situations where the date COULD be converted it does. No matter what formatting I apply to the underlying field, the SQL statement, etc, it doesn't help.
I've included the statement below for reference.
Can anybody help?
TIA
Grant
SQL Statement:
-----------------------------
Form_frmViewSiteDespatches.RecordSource = "SELECT * FROM DESPATCH_HEADER WHERE ((DESPATCH_HEADER.TargetDespatchDate)= #" & Format(Forms![frmViewSiteDespatches]![cmbTargetDespatchDate], "dd/mm/yyyy") & "#);"
-----------------------------
BUT, I'm having problems with the TargetDespatchDate combo box; it seems that the SQL statement behind the AfterUpdate event is attempting to convert the date to American format. For all dates that are above the 12th of the month, the statement resolves fine, but in situations where the date COULD be converted it does. No matter what formatting I apply to the underlying field, the SQL statement, etc, it doesn't help.
I've included the statement below for reference.
Can anybody help?
TIA
Grant
SQL Statement:
-----------------------------
Form_frmViewSiteDespatches.RecordSource = "SELECT * FROM DESPATCH_HEADER WHERE ((DESPATCH_HEADER.TargetDespatchDate)= #" & Format(Forms![frmViewSiteDespatches]![cmbTargetDespatchDate], "dd/mm/yyyy") & "#);"
-----------------------------