Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Posts
    53

    Unanswered: Dcount expression for text box

    Hi all, am running into a bit of a road block. Am trying to create a dcount expression in my form but am encountering error messages. Any help is greatly appreciated.

    Here's the SQL for my NM Production form:

    SELECT [Part Number (valid)], Location, Description, [Package Type], [Date-Time] FROM Slotting_20130204_NM
    UNION
    SELECT [Part Number (valid)], Location, Description, [Package Type], [Date-Time] FROM Slotting_20130205_2_NM
    UNION
    SELECT [Part Number (valid)], Location, Description, [Package Type], [Date-Time] FROM Slotting_20130205_NM
    UNION SELECT [Part Number (valid)], Location, Description, [Package Type], [Date-Time] FROM Slotting_20130206_NM;

    I would essntially like to be able to count the total of Part Number (valid) within a text box.

    Thanks!

  2. #2
    Join Date
    Jan 2013
    Posts
    53
    This worked but would much rather have it in vba. Any suggestions?

    =nz(DCount("[Part Number (valid)]","[NM Production]"),0)

  3. #3
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Quote Originally Posted by VBAnewbie View Post
    This worked but would much rather have it in vba. Any suggestions?

    =nz(DCount("[Part Number (valid)]","[NM Production]"),0)
    What do you mean? This IS VBA.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •