Results 1 to 3 of 3

Thread: Dlookup help

  1. #1
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628

    Unanswered: Dlookup help

    Can anyone please help me with this problem im having?

    What i am trying to do is to get a text box to display the total number of records on a table, and others to display a count of records returned from various queries.

    If anyone can advise me on this then i would be really grateful.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    well you wont get there with DLookup()


    try:
    myTextBox = DCount("someFieldInYourTableOrQuery", "theNameOfYourTableOrQuery")

    DCount() parameters need to be string variables or "QuotedLiteralStrings"

    you can also add criteria to DCount(what, where, criteria)
    criteria are again stringvar or "quoted": they need to look just like what comes after the WHERE in a regular query (but without "WHERE"))

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    That worked. Thanks alot, I really appreciate it.

Posting Permissions

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