Help - Dlookup function
Hi,
I'm using Dlookup function to return a value.
E.g
Dim strName as string
me.txtName.value=strName
If strName = Dlookup("[EmpName]","EmpTable","[EmpID]=" & 1) then
....
[EmpName] and [EmpID] are 2 colummes from the table. If strName matches the [EmpName] in the EmpTable, i should get the corresponding EmpID nos and compare with the value, e.g 1 in this case. But it is not working if there are 2 or more similar value in the EmpID field.
Pls kindly advise or how should my statement looks like?? Thnks alot.
Rgds,
Andy
|