Solved dlookup with two criteria both on form (1 Viewer)

murray83

Games Collector
Local time
Today, 01:48
Joined
Mar 31, 2017
Messages
728
evening people

i have searched on here and google and tried some of them out but to no avail

I'm trying to lookup AskKevImage which is text based on the QuestionNo and QRoundNo as shown below but it isn't working a slight hand greatly appreciated

Code:
=DLookUp("AskKevImage","tblQuestions","QuestionNo = [txtAskKevQuestionNoTrim] " AND "QRoundNo = Forms!frmQuestions![txtQuizNo]")
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:48
Joined
Oct 29, 2018
Messages
21,467
Hi. If this is on the same form as the value you're using for your DLookup() criteria, then try it this way:
Code:
=DLookUp("AskKevImage","tblQuestions","QuestionNo = " & [txtAskKevQuestionNoTrim] & " AND QRoundNo = " & [txtQuizNo])

PS. The above assumes those fields are numeric. If they're text, you'll have to use single quote delimiters.
 

murray83

Games Collector
Local time
Today, 01:48
Joined
Mar 31, 2017
Messages
728
I do love you

well my database now does, cheers and yes it was numeric
 

Users who are viewing this thread

Top Bottom