Results 1 to 4 of 4
  1. #1
    Hendro623 is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Dec 2016
    Posts
    14

    Message Box After AppendQRY That Displays # Of Added Records


    I currently have 3 different append QRYs that populate the same table. The reason for that is so that I can alter the data based on certain criteria. Duplicate will appear on the report which will cause the warning to pop up stating so many records weren't added. I removed the warning with DoCmd.SetWarnings False but i'd like to have it display a message box stating how many records WERE added. Please help!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    If you setWarnings= true ,it will tell you.
    or
    msgbox dcount("*","qsAddQuery")

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You might see help for the "RecordsAffected" property. The property is part of QueryDef Object Members .

  4. #4
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    In TOTAL after all 3 have executed or one at a time? If in total, I'm not sure either proposed solution is ideal. In that case,
    - get the DCount of the table and assign to a variable lngBefore (long data type)
    - run the 3 queries
    - get the new DCount on the table and assign to lngAfter
    - msgbox intAfter - intBefore " records were added."
    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: 1
    Last Post: 10-12-2015, 09:02 AM
  2. Replies: 2
    Last Post: 01-23-2014, 12:40 PM
  3. Replies: 6
    Last Post: 11-18-2013, 04:50 PM
  4. Replies: 1
    Last Post: 02-16-2013, 11:36 AM
  5. Report displays no records
    By windwardmi in forum Reports
    Replies: 5
    Last Post: 10-05-2010, 12:10 PM

Tags for this Thread

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