J
Jahanzaib
Hi,
I have a table named 'Shifts', having 3 fields n with this data.
ShiftID TimeFrom TimeTo
1 11:00:00 AM 06:59:59 PM
2 07:00:00 PM 01:59:59 AM
3 02:00:00 AM 10:59:59 AM
And I have another table named "Complaints", having few fields with a field
'ComplaintTime'
I created following function to return ShiftID in a query
Function ReturnShift(cTime)
ReturnShift= DLookup("ShiftID", "Shifts", "TimeFrom>=#" & cTime & "# AND
TimeTo<=#" & cTime & "#")
End Function
But no values return, I know there is a big problem in my 'Shift' table; In
ShiftID '2' 'TimeFrom' is Greater than 'TimeTo'!!!!
How to resolve it?
Please help.
Regards,
JB
I have a table named 'Shifts', having 3 fields n with this data.
ShiftID TimeFrom TimeTo
1 11:00:00 AM 06:59:59 PM
2 07:00:00 PM 01:59:59 AM
3 02:00:00 AM 10:59:59 AM
And I have another table named "Complaints", having few fields with a field
'ComplaintTime'
I created following function to return ShiftID in a query
Function ReturnShift(cTime)
ReturnShift= DLookup("ShiftID", "Shifts", "TimeFrom>=#" & cTime & "# AND
TimeTo<=#" & cTime & "#")
End Function
But no values return, I know there is a big problem in my 'Shift' table; In
ShiftID '2' 'TimeFrom' is Greater than 'TimeTo'!!!!
How to resolve it?
Please help.
Regards,
JB