multiple creteria in dlookup command

ootkhopdi

Registered User.
Local time
Today, 23:30
Joined
Oct 17, 2013
Messages
181
sir

i have a form with combo box named "TEXT17" i have an another text box named(Basic Pay)
pls tell me how can i use dloolup creteria with two condition
EMPID= text17 value
and month in lbl9 value="mar"

i also paste my code here but show error

Me.Text43 = DLookup("Basicpay", "Salaryall", "[EMPID]='" & Me.Text17 & "'" And "[Month]='" & "Mar")
 
sir

i solved this prob.as
Me.Text43 = DLookup("Basicpay", "Salaryall", "[EMPID]='" & Me.Text17 & "' And [Salmonth]= 'Mar'")

but now i have a problem same
how can i replace 'Mar' with lebal48 value

and how can i sum multi dlookup values
 
Last edited:
I told you to STOP name someone "sir" .
At least, when you speak to Pat, try "Mrs." :)

What happen if you will wish, in the future, that [Salmonth] to be equal with "Apr" ?!?
 
I told you to STOP name someone "sir" .
At least, when you speak to Pat, try "Mrs." :)

What happen if you will wish, in the future, that [Salmonth] to be equal with "Apr" ?!?

sorry but it is my nature to call someone as sir if dont know personally


as your question it works as "apr"

but how can replace mar, apr as labelname

and 1 more question


how can i use "or" function in select query..
as textbox1 or textbox2
can i use it if they are on diffrent forms or same form
 
but how can replace mar, apr as labelname
So let me get this.. So you have a label, lets call it monthLbl, now you Need a DLookUp that will take its criteria from that label's caption? If yes, try..
Code:
Me.Text43 = DLookup("Basicpay", "Salaryall", "[EMPID]='" & Me.Text17 & "' And [Salmonth]= '" & monthLbl.Caption & "'")
If not, explain a little bit of what the problem is exactly..
and 1 more question
For this Question, I have answered in your other thread..
At least, when you speak to Pat, try "Mrs." :)
I would just use Ms. Pat.. or simply Pat.. ;)
 
I would just use Ms. Pat..
Thank you for this. Very much ! The Google Translate say "Mrs." when I ask.
Thank you again and, please, correct me as much as you can (in your time limit).
 

Users who are viewing this thread

Back
Top Bottom