Results 1 to 3 of 3
  1. #1
    CodyL is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6

    Input Form 'Check Box' control to write to multiple tables

    For context:
    I have a database set up to record and maintain product inspections. I started with the original table, "MainData_tbl" adding the fields I needed and from there I made more tables to give my 'MainData' fields some options for the controls to reference; these tables include:


    • "Cables/Plates_tbl"

      • Cables/Plates for projects are input here by admin.

    • "Colors_tbl"
    • "EmployeeDirectory_tbl"
    • "ErrorType_tbl"
    • "Inspectors_tbl"
    • "MainData_tbl"
    • "Stations_tbl"


    Not all of these are necessary to list for my question but I want give as much information as I can without breaching company guidelines as far as data security.

    Our products are built in house and are assigned project numbers. Our projects encompass many smaller components, with individual part numbers, to come to a whole product. The projects are also assigned a color, not physically painted on the project, just for the paperwork to mitigate confusion among production workers having to remember project numbers.

    The way that the inspections are recorded is through a form that writes to "MainData_tbl":
    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	13.2 KB 
ID:	28257
    First the 'PROJECT" number is selected and that requeries 'COLOR', 'CABLE/PLATE' and 'MTG SITE' to show only the options for the project in question. The rest, except for the 'Final Inspection?' Check Box, is pretty much irrelevant for my question.

    My Problem:
    The Check Box writes to a coordinating field in "MainData_tbl", which is what I intend for it to do, however I would also like for it manipulate a similar field in "Cables/Plates_tbl", to give a true value for the cable or plate that the inspection data was entered for so that admin can analyze which cable or plates have or haven't been inspected.

    Is it possible for one Form control to write to more than one table?

    I may have left some pertinent information out, forgive me I am working on many things on top of maintaining this database. If there is any information needed along with what I've already provided please feel free to ask.

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Sure, you can easily add code to update another table's field with a value, but why store the same value in two places? This wouldn't be normalized design. Instead, in your form or query that pulls data from the other table, join the first table with the checkbox field and include it as a returned field.

  3. #3
    CodyL is offline Novice
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jun 2016
    Posts
    6
    Would you mind elaborating? I'm not sure how to join the table and checkbox field.

    For further context:

    • Here are the fields in "MainData_tbl":
      • |PROJECT|COLOR|CABLE/PLATE |INS.|TIME|ERROR|WHO|STATION|INS. DATE|NOTES|INSPECTOR|PROCESSED?|WV|

    • Here are the fields in "Cables/Plates":
      • |PROJECT|CABLE/PLATE ||MTG SITE|PROCESSED?|

    The field the Check Box writes to is 'Processed?' in "MainData_tbl". Like I said the projects are composed of different components, so the project fields in both of these tables are repeated for each component in that project. The data for "Cables/Plates_tbl" is input by admin before the inspectors fill out the form, giving the combo box for cables/plates a row source. So I want the check box to write to the new record in "MainData_tbl" and manipulate the corresponding record in "Cables/Plates_tbl".

    I hope this helps elaborate on my issue.

    Quote Originally Posted by jwhite View Post
    Sure, you can easily add code to update another table's field with a value, but why store the same value in two places? This wouldn't be normalized design. Instead, in your form or query that pulls data from the other table, join the first table with the checkbox field and include it as a returned field.
    Attached Thumbnails Attached Thumbnails 1.PNG   2.PNG  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Input form with check boxes
    By p3rlend in forum Forms
    Replies: 5
    Last Post: 06-09-2016, 08:11 AM
  2. Replies: 2
    Last Post: 03-13-2015, 07:52 AM
  3. Replies: 5
    Last Post: 05-18-2012, 07:31 AM
  4. Help making a form write to multiple tables
    By shiphtfour in forum Forms
    Replies: 2
    Last Post: 01-15-2011, 04:12 PM
  5. Replies: 1
    Last Post: 12-13-2010, 04:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums