I am trying to populate a form control Field1 ["DailyHireRate"], by looking up a value from a table ["Rates"], based on the date specified in another control Field2 ["ChargeDate"] on the same form.
Form = "Transactions"
Field1 = "DailyHireRate" - Format: General Number
Control Source: =DLookUp"[DailyHireRate]","[Rates]","[BDate]<=#" & [Forms]![Transactions]![ChargeDate] & "# AND [EDate] >#" & [Forms]![Transactions]![ChargeDate] & "#")
Field2 = "ChargeDate" - Format: ShortDate (=UK dd/mm/yyyy)
Table = "Rates" - 3 field thus:
DailyHireRate BDate EDate
10 01/11/1998 31/12/1999
20 01/01/2000 31/12/2000
30 01/01/2001 10/02/2002
40 11/02/2002 10/02/2003
The lookup finds the correct rate ruling as per the date shown in "ChargeDate" on the Transactions form with the exception of the following dates:
04/02/2002, 05/02/2002, 06/02/2002, 07/02/2002, 08/02/2002, 01/05/2002 and 02/05/2002.
Is Access applying the US date format somehow and if so how do I correct it?
Any help would be greatly appreciated
Form = "Transactions"
Field1 = "DailyHireRate" - Format: General Number
Control Source: =DLookUp"[DailyHireRate]","[Rates]","[BDate]<=#" & [Forms]![Transactions]![ChargeDate] & "# AND [EDate] >#" & [Forms]![Transactions]![ChargeDate] & "#")
Field2 = "ChargeDate" - Format: ShortDate (=UK dd/mm/yyyy)
Table = "Rates" - 3 field thus:
DailyHireRate BDate EDate
10 01/11/1998 31/12/1999
20 01/01/2000 31/12/2000
30 01/01/2001 10/02/2002
40 11/02/2002 10/02/2003
The lookup finds the correct rate ruling as per the date shown in "ChargeDate" on the Transactions form with the exception of the following dates:
04/02/2002, 05/02/2002, 06/02/2002, 07/02/2002, 08/02/2002, 01/05/2002 and 02/05/2002.
Is Access applying the US date format somehow and if so how do I correct it?
Any help would be greatly appreciated