Results 1 to 3 of 3
  1. #1
    craig1988 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2014
    Posts
    82

    Personalize the text of a MsgBox

    I would like to personlize the message displayed to a user.

    The user clicks a button which runs the four append queries below. Each time the queries are ran, the number of records change.

    I have turned off the SetWarnings.

    When the import is complete, a MsgBox displays a message saying that "Records have been imported". I would like to be able to display a breakdown of the records imported for example.

    0 DDI records added
    4 DDO records added
    2 CTI records added
    0CTO records added

    Hopefully someone can help me out


    Code:
    Function MMassImportOFAC()
    On Error GoTo MMassImportOFAC_Err
        DoCmd.SetWarnings False
        DoCmd.Hourglass True
        DoCmd.OpenQuery "QOFACImportDDIn", acViewNormal, acReadOnly
        DoCmd.OpenQuery "QOFACImportDDOut", acViewNormal, acReadOnly
        DoCmd.OpenQuery "QOFACImportCTIn", acViewNormal, acReadOnly
        DoCmd.OpenQuery "QOFACImportCTOut", acViewNormal, acReadOnly
        Beep
        MsgBox "Records have been imported", vbInformation, "Import Complete"
        DoCmd.SetWarnings True
    
    MMassImportOFAC_Exit:
        Exit Function
    MMassImportOFAC_Err:
        MsgBox Error$
        Resume MMassImportOFAC_Exit
    End Function


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Code:
    dim lCnt as long 
    lCnt = dcount("*","table")
    
    msgbox  lCnt & " records imported"

  3. #3
    craig1988 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Aug 2014
    Posts
    82
    Hi Ranman

    You are really helping me out so thank you for your ongoing help.

    What table do I tagret to extract the correct figure?

    I tried to target the append queries but I got an error message?

    Regards
    Craig

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

Similar Threads

  1. Text Box Value in Msgbox ? Arg ?
    By redbull in forum Programming
    Replies: 3
    Last Post: 10-31-2012, 01:18 PM
  2. Yes No msgbox
    By imintrouble in forum Access
    Replies: 3
    Last Post: 10-14-2011, 02:24 PM
  3. MsgBox
    By Mtyetti in forum Forms
    Replies: 4
    Last Post: 07-27-2011, 01:51 PM
  4. Custom MsgBox
    By roccoIT in forum Programming
    Replies: 3
    Last Post: 07-06-2010, 10:43 AM
  5. Yes No Cancel MsgBox
    By Rick West in forum Forms
    Replies: 5
    Last Post: 04-14-2010, 08:57 AM

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