Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Trying to use DLookup for control source of a field on a report

Can someone tell me what is wrong with this...

 =DLookUp("[Qty]", "tblPrintOrdTranx", "[PartN] = Forms!frmEnterJobNumber.cbojobn.column(1)


Note:  PartN is a text field.

--Steve
0
SteveL13
Asked:
SteveL13
  • 2
1 Solution
 
jppintoCommented:
=DLookUp("[Qty]", "tblPrintOrdTranx", "[PartN] =" & Forms!frmEnterJobNumber.cbojobn.column(1))
0
 
mbizupCommented:
=DLookUp("[Qty]", "tblPrintOrdTranx", "[PartN] = '" Forms!frmEnterJobNumber.cbojobn.column(1) & "'"

You need quotes for text fields
0
 
mbizupCommented:
Correction:

=DLookUp("[Qty]", "tblPrintOrdTranx", "[PartN] = '" & Forms!frmEnterJobNumber.cbojobn.column(1) & "'")
0
 
MINDSUPERBCommented:
Try this if your PartN is a text value.

=DLookUp("[Qty]", "tblPrintOrdTranx", "[PartN] ='" & Forms!frmEnterJobNumber.cbojobn.column(1) & "'")

Ed
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now