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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying results of append queries 1

Status
Not open for further replies.
Oct 20, 2003
193
GB
Good morning all

I am running 2 append queries to update a staffinf table via a macro (I'm fine with converting to VBA if that would help) I'm turning warnings off before I run them, but I would like to be able to give feedback to the user if the table is updated. Basically telling them that x number of records have been updated, if any are.

So.. help please :D

Oh yes I'm on Access 2000
 
A starting point (VBA code):
Set qdf = CurrentDb.QueryDefs("your append query")
qdf.Execute
MsgBox qdf.RecordsAffected & " records inserted"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Would this work?

Set qdf = CurrentDb.QueryDefs("your append query 1")
Set qdg = CurrentDb.QueryDefs("your append query 1")
qdf.Execute
qdg.Execute
MsgBox qdf.RecordsAffected & " records inserted for city and " & qdg.RecordsAffected & " records inserted for county."

I know I could try it but it's all a bit conceptual atm I'm trying to iron out bugs in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top