Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record Count 1

Status
Not open for further replies.

jon92

Technical User
May 30, 2001
37
GB
I have a table that is populated by a text import, I then run an update query to add data to the records just imported. I would like to have the default confirmation messages turned off ( for the update query) but have a custom message box telling the user how many records have just been updated. Is this possible?

Regards Jon
 
Hi Jon!

Before you run the update query use the line:

DoCmd.SetWarnings False

and then after put:

DoCmd.SetWarnings True

Then add the following

Dim rst As DAO.Recordset

Set rst = CurrentDb.OpenRecordset("YourTable", dbOpenDynaset)

rst.MoveLast
Call MsgBox("There were " & rst.RecordCount & " records imported")

hth


Jeff Bridgham
bridgham@purdue.edu
 
Thanks Jeff

Exactly what I wanted

have a star!

Jon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top