By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,832 Members | 1,202 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,832 IT Pros & Developers. It's quick & easy.

Pop up in MS Access

P: 2
Dear Collegues
I cant find a group for MS Access any way,i want to display an alert like the one in .net inside VBA in MS Access this alert asks the user if he would like to save the recorde or not if the user press yes we (Commit) if no undo changes.Please if any one know hot to make this code by visual basic subit it to me.Thanks
May 27 '07 #1
Share this Question
Share on Google+
2 Replies

P: 27
Try this, I just don't know how to detect if there were changes made prior to running this, so that it won't happen if there were no changes.

Dim intButtonPressed As Integer
intButtonPressed = MsgBox("Save Changes?", vbYesNo, "Save")
If inButtonPressed = 7 Then
MsgBox ("Changes to record were not saved.", , "Record Not Saved!")
Me.Undo
Else
MsgBox ("Your record has been saved.")
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord,, acMenuVer 70
End If
Jun 4 '07 #2

Motoma
Expert 2.5K+
P: 3,237
I have moved this thread to the Access forum, with the hopes that the Experts there will have more information for you.
Jun 4 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.