Question : Number of records when appending query via VBA

I have the attached code that runs an append query called "qryAppendImported" I wanted to see if there is a possibility for me to create some sort of function that will display the number of records appended. Right now I placed the DoCmd.SetWarnings False in my code because I don't want the user to see the message "you are about to run an append query" and then displays how many records have been loaded. Is there a way to simply show even by code or some custom message the number of records appended?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
Dim aSQL As String
Dim strFolder As String
Dim strFile As String
Dim strTable As String

DoCmd.OpenQuery "qryDeleteImported"

Select Case Mid(Me.txtFilename, InStrRev(Me.txtFilename, "."))
    Case ".xls"
'        MsgBox "Excel File"

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "myImport", Me.txtFullpath, True
    Case ".doc"
        MsgBox "Word File"
    Case ".pdf"
        MsgBox "Adobe File"
    Case ".txt"
        MsgBox "Text File"
    Case ".csv"
        MsgBox "CSV File"
End Select
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryAppendImported"
         Beep
    MsgBox "Your data has been imported successfully" & vbCrLf & "", vbInformation, "Data import complete"

DoCmd.Close

Answer : Number of records when appending query via VBA

DoCmd.SetWarnings False
msgbox dcount("*","qryAppendImported") & "  " & records will be appended"

DoCmd.OpenQuery "qryAppendImported"
Random Solutions  
 
programming4us programming4us