im using the dlookup() to prievew password at a unbound textbox within a criteria that the username and security question that are entered matches the database.
Ex: user forget password.
he enters his user name, and select the security question, and answer the question.
if these data match the data in the tabels, then his password should be shown in the text box.

Me.passwordtxt.Value = DLookup("PASSWORD", "SYS_USER", "[USERNAME]=" & Me.usernametxt & " And[ANSWER]=" & Me.answertxt & "")

the error which comes is expression not match ? and tells me the username ??

any help will be very kind of you all, i tried working on this for two days, and posted many questions and didnt get accurate answers, any way thanks for any help in advance.

debasisdas commented: this is the 7th thread for the same question. -3

Your answer is here: http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/364355
Basically the same question, but with more code wrapped around it, made it easier to figure out what was wrong with your code. In this thread, you aren't using single-quotes to wrap around your embedded variables, plus DLookup needs a variant datatype variable to put it's results.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.