Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to hold off a save until completed. (97 / SR-2)

    I have created a wizard type interface as an option for entering patients into the database. It collects a lot of information like exam info, film info from multiple tables. However as I'm going through entering a new patient and it's related information, If I close the form it saves the information up to that point. I want to wait until they are at the last page of the wizard and when they click the finish button I want it to update to the tables. Any ideas on the best way to go about doing this?
    Thanks a bunch
    Jols

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: How to hold off a save until completed. (97 / SR-2)

    The big problem is that Access will try to save the data at various times (assuming a bound form); such as moving from a mainform to a subform. You could use an unbound form, or you could have some required fields on the last page of your form. Therefore, the user won't be able to save the work until these required fields have been filled-in.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Portland, Maine, USA
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to hold off a save until completed. (97 / SR-2)

    Thanks for responding Mark.
    How would the unbound forms approach work? Especially with 5 subforms throughout the main form. Would all the subforms have to be unbound also? If so, how would I go about doing this? Thanks
    Jols

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: How to hold off a save until completed. (97 / SR-2)

    Wizards and such normally use either unbound forms or forms that are bound to something like a flat table that holds nothing but the temporary record being created. Then when the final save button is clicked, the data is extracted from the flat table and properly relational records are created. An unbound form simply takes what the user types in and holds on to it until whatever code you have behind that magic button is called to create new records using the values the user entered into the various forms.

    You can use subforms on unbound forms, in fact you can use unbound subforms on unbound forms, but I doubt that you would really need them. Of course, without more information about exactly what you're doing, none of us can guess at the best way for you to do it.
    Charlotte

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: How to hold off a save until completed. (97 / SR-2)

    >>How would the unbound forms approach work? Especially with 5 subforms throughout the main form. Would all the subforms have to be unbound also? If so, how would I go about doing this? <<

    With an unbound form, you must do all the work. You have to read a record from a recordset, then fill each control with the proper value. When a Save button is finally hit, you must turn around and do the opposite; that is, update each field in the current record of the recordset. However, you would still have to write a record before you moved to the subforms, because undoubtedly you have enforced referential integrity, so you wouldn't be able to write a record for a child table before writing the parent record. You can still use subforms with an unbound mainform, and they can still be bound.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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