views:

145

answers:

2

I have a problem with the below dlookup fuction its result

Null value

txtAbsSunStore1.Value = DLookup("Store1", "tblAbsense", "TestId = " & lstResults.Column(1, 0) & " And Day = 'Sunday' And Empid = " & Me.txtEmpIdSearch.Value & " ")

All the variable have value and the corresponding value is there in the table too

A: 

Are you sure you have this record in you Database? You can also try to check the where clause with this code

st_where = "TestId = " & lstResults.Column(1, 0) & " And Day = 'Sunday' And Empid = " & Me.txtEmpIdSearch.Value & " "

and then see what "st_where" variable is with debug window or watch window. Check if TestId and Empid columns are numeric.

mik
A: 

Jasison,

I don't get why you would start a new thread on the same question. If you would ask one question and stick with supplying the needed information when asked I think you would have better success.

Starting a new thread disrespects the people who have already put time and effort into answering your question.

Seth

Seth Spearman