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

MsgBox confirming status

Status
Not open for further replies.

Eddyoftheyear

Technical User
Aug 11, 2010
57
0
0
US
Hi Tek Experts,

I am running a apend queries and wanted to add mesage box confirming the operation when the records are apended.

the following codes I used to apend the records:

DoCmd.Hourglass True
Turns off the Access warning messages
DoCmd.SetWarnings False
DoCmd.OpenQuery "Step 2_qry"
DoCmd.OpenQuery "Step 1_qry"
DoCmd.OpenQuery "Step 3_qry"

Turns the Access warning messages back on
DoCmd.SetWarnings True

 
Do you simply want to add a message box to your code?

Code:
DoCmd.Hourglass True
	'Turns off the Access warning messages
	DoCmd.SetWarnings False
		DoCmd.OpenQuery "Step 2_qry"
		DoCmd.OpenQuery "Step 1_qry"
		DoCmd.OpenQuery "Step 3_qry"
		[b][blue]MsgBox "Appended confirmation message", vbInformation, "Appended Confirmation Title"[/blue][/b]
	'Turns the Access warning messages back on
	DoCmd.SetWarnings True

If you wanted to know if your queries (eg. "Step 2_qry") actually appended data to a table then this will take a little more than just a simple msgbox command.

[yinyang]
Shann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top