total no. of records in a message box

MeU&Us

Registered User.
Local time
Tomorrow, 00:48
Joined
Dec 28, 2008
Messages
31
hi
i need to view the total number of records in 3 different tables, to be displayed, before running a query, and after runnig the query,
i also want, after running the query ( update or append), that how many records have been adde, or updated.
i want these results in a message box, using vb code, ...
any one can help me pls...
 
Perform DCounts() before and after running the queries to get the counts in the tables and pass these to the message box.
 
i know Dcount() will work for me, i just dont know how to get this function in msg box.
i need message box to display like this:

Total No. of records in Table A are 1500.
Total No. of records in Table B are 1000.
Total No. of Records in Table C are 900.

can u elaborate a little bit pls
 
Code:
Dim Msg As string

Msg = "Table 1 has " & DCount("*","Table1") & " record(s)" & vbNewLine
Msg = Msg & "Table 2 has " & DCount("*","Table2") & " record(s)" & vbNewLine
Msg = Msg & "Table 3 has " & DCount("*","Table3") & " record(s)" & vbNewLine

Msgbox Msg,,"Totals"
 

Users who are viewing this thread

Back
Top Bottom