Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2013
    Posts
    23

    Unanswered: pre-populate a form from one table but saving it into another

    Hi,

    I need advice on how to go about pre-populating fields on a Form from one table, allowing changes to be made and then saving these entries on a second table.

    Eg I need 'FormA' to load on a click event, pre-populated from 'Table1', Users can then make any changes to this pre-populated form (without changing the source data in 'Table1') and then click the Email button. On clicking the Email button I want the data in the Fields to be save into 'Table2'.

    Is this possible?

    Thanks in advance

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    496
    Provided Answers: 24
    Have a 'working' table, default table, and final table.
    User clicks edit, it runs append query to the 'working table'
    all defaults are appended from the 'default table' to an empty 'working' table that the form is connected to.

    The user then edits the 'working table' when done, click ths SAVE button.
    The save button runs another qry to append the changes to the 'final' table.

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    It sounds as if Table1 and Table2 are identical in structure...is this true?

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Oct 2013
    Posts
    23
    Apologies for the delay.

    Yip both are identical - I have managed to get a working model from ranman's advice.

    Many thanks on this

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why would you you DUPLICATE a table, let alone TRIPLICATE it... unless there are very very good business reasons to do so its a recipie for disaster.
    instead consider having a state column which tells you what state that row is in (ie working, default or final)
    why.. well its juts pants to store the same data more than once. but there is a good reason not to. ...what happens if some bright spark decides to have a 4th 'table', called say 'production'.. in your model that means creating a new table, modifying queries, modifying forms and so on... the state flag way means that another state can be handled seemlessly without further development time or resource.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by healdem View Post

    ...why would you DUPLICATE a table, let alone TRIPLICATE it...its a recipie for disaster...
    Which is exactly why I asked the question! You're violating the rules, not to say the advantage, of a relational database!

    I cannot imagine a valid business reason for doing this! Heed healdem's excellent advice!

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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