Dlookup

  • Thread starter Thread starter David W
  • Start date Start date
D

David W

I can use dlookup to a search for 1 item in a record, but how would you
compare a second item to the same record?
I used
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#") Then
to find the record, but I need to compare [employee] in ths same table to
see if the record exist.

Is that possible?
 
I can use dlookup to a search for 1 item in a record, but how would you
compare a second item to the same record?
I used
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#") Then
to find the record, but I need to compare [employee] in ths same table to
see if the record exist.

Is that possible?

If I understand you correctly ...

DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "# AND
[EmployeeID] = " & Me![EmployeeID])

wher the [EmployeeID] is a Number datatype.
 
I got this a few minutes ago
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#" _
& " And employee = '" & Forms!time1.Combo217 & "'") Then

fredg said:
I can use dlookup to a search for 1 item in a record, but how would you
compare a second item to the same record?
I used
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#") Then
to find the record, but I need to compare [employee] in ths same table to
see if the record exist.

Is that possible?

If I understand you correctly ...

DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "# AND
[EmployeeID] = " & Me![EmployeeID])

wher the [EmployeeID] is a Number datatype.
 
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#") Then
strEmp = DLookup("employee", "repairlog", "date1 = #" & Me!dateset1 &
"#")
End If

Of course you would be better off using a query as DLookup's can be quirky.

I can use dlookup to a search for 1 item in a record, but how would you
compare a second item to the same record?
I used
If DLookup("date1", "repairlog", "date1 = #" & Me!dateset1 & "#") Then
to find the record, but I need to compare [employee] in ths same table to
see if the record exist.

Is that possible?
 
Back
Top