• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

Another DSum syntax question

What is wrong with this code?

me.txt10EnvInventory = Nz(DSum("Qty", "tblEnvelopeInventory", "[CompanyName] = '" & me.txtBankName & "' And [EnvelopeStyle] = '" & Me.txt10WindEp "'),0)

The apostrophies and double quote marks mess me up every time.

--Steve
0
SteveL13
Asked:
SteveL13
1 Solution
 
Dale FyeCommented:
It is the very end,

me.txt10EnvInventory = Nz(DSum("Qty", "tblEnvelopeInventory", "[CompanyName] = '" & me.txtBankName & "' And [EnvelopeStyle] = '" & Me.txt10WindEp & "'"),0)

You forgot to concatenate the last ', and it was missing the trailing quote.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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