P
PER HILDAL
Hello !
In MS Access you need to use US date format to search date in sql
expressions
this is fearly understandable but why is my qury expression so slow do
anyone have a tuning tip to this code !
I tried defining Fra and til as date but that doesent work in the expression
Public Function ID_Booking(Fra_StKa As Date, Til_StKa As Date)
On Error GoTo Error_ID_Booking
Dim Criteria As String
Dim Fra as Variant , Til as Variant
Fra = "#" & Format(Fra_StKa, "mm-dd-yyyy Hh:nn:ss") & "#"
Til = "#" & Format(Fra_StKa, "mm-dd-yyyy Hh:nn:ss") & "#"
ID_Booking = DLookup("[ID_FaPo]", "Table_Name", "[Fra_FaPo] <=" & Fra & "
And " & "[Til_FaPo] >" & Til)
Exit Function
Error_ID_Booking:
MsgBox Err.Description
End Function
Thanks for any reply
PSH
In MS Access you need to use US date format to search date in sql
expressions
this is fearly understandable but why is my qury expression so slow do
anyone have a tuning tip to this code !
I tried defining Fra and til as date but that doesent work in the expression
Public Function ID_Booking(Fra_StKa As Date, Til_StKa As Date)
On Error GoTo Error_ID_Booking
Dim Criteria As String
Dim Fra as Variant , Til as Variant
Fra = "#" & Format(Fra_StKa, "mm-dd-yyyy Hh:nn:ss") & "#"
Til = "#" & Format(Fra_StKa, "mm-dd-yyyy Hh:nn:ss") & "#"
ID_Booking = DLookup("[ID_FaPo]", "Table_Name", "[Fra_FaPo] <=" & Fra & "
And " & "[Til_FaPo] >" & Til)
Exit Function
Error_ID_Booking:
MsgBox Err.Description
End Function
Thanks for any reply
PSH