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

Rollback on Add and View/Amend screens

Status
Not open for further replies.

Sech

Programmer
Jul 5, 2002
137
0
0
GB
I've created a small database with an add new record screen and a view/amend screen (currently bound). I would like to add transaction rollback to these screens if possible. But I believe that rollback only works if you use queries/SQL statements, and currently to add a record I'm using the addnew command in code and then setting the fields to the boxes on the screen. On the view screen there is no code currently as it is bound directly to the table. Does anyone know how I would add rollback to either of these screens? I tried creating an append query that takes the values off the screen instead, but this doesn't seem to execute right when set to a querydef. Am I doing something wrong?
 
Maybe use a transaction

transaction
A series of changes made to a database's data and schema. Mark the beginning of a transaction with the BeginTrans statement, commit the transaction by using the CommitTrans statement, and undo all your changes since BeginTrans by using the Rollback statement.Transactions are optional and can be nested up to five levels. Transactions increase the speed of operations that change data and enable you to reverse changes easily.Transactions are global to the referenced database object's Workspace.

Pampers [afro]
Keeping it simple can be complicated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top