Results 1 to 10 of 10
  1. #1
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170

    Counter on a Form

    Hello,

    I am posting that under several Headings because I am not sure where the answer lies (Query, VBA, somewhere else), but basically I have a form with headings:

    LID: (Acct #)
    Operator: (Data-Entry Processor)
    Time: (7:00 AM - 8:00 AM, 8:00 AM - 9:00 AM, etc)
    Process: (Packaging, Shipping, etc)
    Primary: Descritpion of shift


    Secondary: Descritpion of shift
    Secondary: Descritpion of shift

    The form is designed to allow users to use a wand to quickly scan in multiple LID's under the other field options.

    The form is tied to a table, "MainDB" that records all this information.

    How can I create a counter on the Form that counts how many LID's that specific Operator is doing (this form will be distributed to 50+ front-end users, and I don't want them knowing what everyone else is doing)

    Thank you for your replies.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Quote Originally Posted by athyeh View Post
    Hello,

    I am posting that under several Headings because I am not sure where the answer lies (Query, VBA, somewhere else), but basically I have a form with headings:
    Please don't post the same question multiple times.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    One way would be a DCount() function with the operator as a criteria.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Thank you for your reply, and I will not do that again.

    =DCount("[LID]","tblMainDB","Operator" And "Time")

    Produces a count for all records, regardless of Operator or Time... How can I edit?

    Also tried:

    =DCount("[LID]","tblMainDB","[me]![Operator]" And "[me]![Time]")

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    See if this helps:

    DLookup Usage Samples
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    =DCount("LID","tblMainDB","LID = " & [Forms]![frmMAINFORM]![Operator] & " AND [Forms]![frmMAINFORM]![Time]")

    Please assist...

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You don't have the second field name. If both are numeric fields:

    =DCount("LID","tblMainDB","LID = " & [Forms]![frmMAINFORM]![Operator] & " AND [Time] = " & [Forms]![frmMAINFORM]![Time])

    Time isn't a good field name, as Access can confuse it with the built-in Time() function.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Perfect. Thread Solved. Thank you.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Unsolved.... How do I incorporate reset options (Per Day, Per Hour)? Is there anyway to automate those options?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Counter For Your Form(s)
    By burrina in forum Sample Databases
    Replies: 0
    Last Post: 11-14-2012, 06:28 PM
  2. Loop Counter
    By elementalnature in forum Programming
    Replies: 3
    Last Post: 09-17-2012, 10:00 PM
  3. Counter
    By Skroof in forum Access
    Replies: 3
    Last Post: 05-14-2012, 08:25 AM
  4. Database Usage Counter in Main Form
    By rkalapura in forum Forms
    Replies: 5
    Last Post: 04-15-2012, 09:02 PM
  5. lap Counter
    By challenger in forum Access
    Replies: 4
    Last Post: 07-06-2010, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums