Is it possible to set two criteria in the selection part of a DLookup function
I am trying to get a single value for a query with several records. To get the single value I need to set the [startdate] AND [SLTUnique], as below.
slastart = DLookup("starttime", "SLAshiftquery", "startday = " & currentday And "SLTUnique =" & callSLT)
The original Dlookup worked i.e. slastart = DLookup("starttime", "SLAshiftquery", "startday = " & currentday), but gave many records.
I get a TypeMismatch error, although I have set the SLTUnique to Integer (because is it one)
Any ideas please, as my brain is beginning to hurt!!
Bob C
I am trying to get a single value for a query with several records. To get the single value I need to set the [startdate] AND [SLTUnique], as below.
slastart = DLookup("starttime", "SLAshiftquery", "startday = " & currentday And "SLTUnique =" & callSLT)
The original Dlookup worked i.e. slastart = DLookup("starttime", "SLAshiftquery", "startday = " & currentday), but gave many records.
I get a TypeMismatch error, although I have set the SLTUnique to Integer (because is it one)
Any ideas please, as my brain is beginning to hurt!!
Bob C