Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2013
    Posts
    18

    Exclamation Unanswered: Updating 2 Tables with one Unbound Form

    I Have a form that is populated with data from a query. There are 3 fields that arent filled with data. so i want the user to then fill in those fields and then save the record. When he/she does save the record i want the data in the top fields to go to one table and the data from the bottom fields to go to a different table. So i have 1 form and 2 tables. Those two tables need to be updated by the 1 form. How Would i Do that?

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    This sort of thing is normally done using two Forms, each one based on a single Table, then the Forms used in a Main Form/Subform scenario. The two Tables would have to have a unique, identifying Field in common, which would be the Primary Key in one Table and the Foreign Key in the other.

    There are legitimate reasons for using Unbound Forms in Access, but this doesn't sound like one of them. The advantage in using Access, with Bound Forms, is the speed with which an app can be developed, primarily because with Bound Forms, Access does most of the heavy lifting, whereas with Unbound Forms, the developer has to write custom code to handle just about everything.

    If you insist on using Unbound Forms, you'd be far better off using a straight VB or C++ front end with a SQL Server or Oracle back end.
    • You can create an EXE file which gives total protection to your code/design
    • You can distribute the db to PCs without a copy of Access being on board
    • Your data security is far, far better than anything you can do in Access


    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

  3. #3
    Join Date
    Mar 2009
    Location
    Gatineau, Quebec Canada
    Posts
    147
    Provided Answers: 1
    You can use multiple "INSERT" commands with "docmd****nSQL" each to a different table, and have the "save" function off the "click" event of a button. But as LING says, you have to carefully clean and protect the input yourself (especially for the notorious " ' " in strings.)

    J Smith
    Aylmer, Quebec

Posting Permissions

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