Results 1 to 6 of 6
  1. #1
    chimp8471 is offline Novice
    Windows 10 Office 365
    Join Date
    May 2021
    Posts
    25

    Display number of records in a table on my form... to update every time a new record is added

    I have a form which i want to display the number of records in a specific table.. and update every time a new record is added automatically



    I put a Textbox on the form and got it to display the qty

    used this as the lookup

    DCount("*","tTempPartsIssued")

    but i get #Name? as an error in the box...

    Any help would be appreciated

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    you can put a control refresh in the TIMER event.
    set the timer interval = 10000 (10 seconds)

    Code:
    Private Sub Form_Timer()
    txtBox1.Requery
    End Sub

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    I'm confused
    I put a Textbox on the form and got it to display the qty
    but i get #Name? as an error in the box...
    So it works but it doesn't? What you have should work but why not just use the built in navigation control, which shows the record count of a table? Or is the form is filtered?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,471
    Pick a field in the table and not * to count?

  5. #5
    chimp8471 is offline Novice
    Windows 10 Office 365
    Join Date
    May 2021
    Posts
    25
    Sorted thanks all.... I will get there eventually

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    The usual last step is to post your solution for the benefit of others who might have the same issue in the future.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 4
    Last Post: 09-22-2018, 09:37 AM
  2. Replies: 2
    Last Post: 02-15-2018, 05:19 PM
  3. Replies: 2
    Last Post: 10-17-2016, 09:16 AM
  4. Replies: 2
    Last Post: 11-07-2014, 02:53 PM
  5. Replies: 6
    Last Post: 07-25-2011, 01:54 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