Next Tip    Confirming Changes To Records

Users will sometimes make changes to important data and not be aware that they have made those changes.  The following subroutine can be used on most forms to come up with a confirmation message.

Open the form in design view

Select the menu item View ... Code

Go to the very bottom of the code and cut and paste the following

Private Sub Form_BeforeUpdate(Cancel As Integer)
' Confirm with user that this record is to be modified
  Dim updRecord As Byte  
  updRecord = MsgBox("Confirm Amounts record change", vbOKCancel, "Record Modification")
  If updRecord = vbCancel Then  
    Cancel = True    
  End If  
End Sub

You should now get a message every time you change or add a record.

Try out our popular Access shareware Graf-FX  
 
http://www.vb123.com/explore

 

Our Tools and Resources

  • RSS & Newsletter Here
    Join our newsfeed or sign up for our informative newsletter on Office Automation, Access and VB topics
  • Get Good Help
    If you need help with a database, our Australian Professionals could be the answer

  • Smart Access is online 
    The best magazine written about Microsoft Access is now being transferred to the web. There are 400 articles written by a 100 authors in the collection. 

    Purchase Smart Access

  • The Workbench
    Find out who has your database open, start the correct version of Access, easy compacting and backups, change startup options, creation versions,  shutdown database

  • Read about the Toolbox
    Sample downloads, library resource kit and searchable help file comprising most of the information at vb123.com.au plus hidden downloads etc. Includes one of Smart Access downloads.

  • Convert Access to SQL Server  
    Upsize to SQL Server 2005 or 2008, easily repeated conversions, highly accurate SQL query  translation and web form conversion.
  • Purchase the Popular FMS Products  
    If you purchase the Popular FMS products from us, you will receive a complimentary of Smart Access Gold, Silver or Bronze Collections [Your choice]

 

 

vb123 Professionals


Get Good Help Here

If you need help with a database or Office programming, our Professionals could be the answer because we have worked on many similar solutions



Frontpage Conversions
We have converted vb123.com to Expression Web, contact us if we can help you move to the latest Microsoft web tool.


About The Editor ~ Contact Us
Garry Robinson writes for a number of popular computer magazines, is now a book author and has worked on 100+ Access databases. He is based in Sydney, Australia

Access 2003 Security

MS Access Security

Read More here