Dlookup for with two criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
Can the criteria of Dlookup compose of two fields.
How can we write the syntax.
I tried
CQ = DLookup("[QTc]", "Stockinventorylog",
"[RCID]=Forms![Stockinventory]![StockinventoryLog Subform]![ID]-1" And "[RC]
= 31112.03")

Please can you help me solve this problem
 
Bassel said:
Hello
Can the criteria of Dlookup compose of two fields.
How can we write the syntax.
I tried
CQ = DLookup("[QTc]", "Stockinventorylog",
"[RCID]=Forms![Stockinventory]![StockinventoryLog Subform]![ID]-1"
And "[RC] = 31112.03")

Please can you help me solve this problem

The And needs to be inside the quotes. The simplest way to think about it
is that the third argument of a Domain Aggregate can be any valid SQL WHERE
clause that would work in a query with the word "WHERE" stripped off the
front.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Expression not working 2
Dlookup using multiple criteria 2
DLookup Syntax Question 3
dlookup challanges 1
dlookup problem 5
Dlookup to populate sub form 12
Access Dcount (multiple criteria) 3
dlookup runtime error 3075 1

Back
Top