Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form Transaction Processing (2003)

    End-users would like the startup form of the attached mdb to behave much like Excel as far as saving the data being inputted i.e. they'd like to go ahead and modify the data but be able to commit the modifications only when they're ready to with a "Save" button or something of the sort, otherwise the data would remain unchanged.
    Is it feasible?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Transaction Processing (2003)

    One option would be to create a copy of the Previsioni table, and to bind the form to a query based on the copy instead of the original. When the user clicks Save, transfer the records to the original table.

    Another option would be to create an unbound version of the form, but that would be a lot of work.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form Transaction Processing (2003)

    How would the unbound version of the form work? I suppose you'd put code in the AfterUpdate event of each text box that receives data but how would you prevent the code from running until the user clicks the Save button?
    I wonder if the ADO methods BeginTrans, CommitTrans, and RollbackTrans might come in handy this time around.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Form Transaction Processing (2003)

    For an unbound form, you'd have to create a text box for each field and for each of the 24 hours of the day - an unbound form by definition is not a continuous form, so you must simulate it.
    You don't necessarily need After Update event procedures for the controls.
    When the form is opened to edit existing records, you'd use ADO or DAO code to open a recordset, then loop through its records and fields to populate the controls on the form.
    The Save command button would use ADO or DAO code to add new records or update existing records, as appropriate.
    The Cancel command button would simply close the form.

    BeginTrans etc. can be used if you want to roll back the entire save operation if an error occurs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •