Results 1 to 12 of 12
  1. #1
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12

    Populating unbound related tables


    Hi, forgive my lack or knowlege I am new on access databases programming, but I searched and look for any sample or post that can help me to solve my doubt without luck.
    here is my problem. I need to make one database with information about torque values according to one defined table. I make 3N so I can avoid duplicating data, by my problem now is how to enter data into the related tables and save the data using a save button. I want to have control about when data is saved that is the reason because I used unbound controls to enter data and I want to use also a new button to add new records.

    I think it should be ease but I have tried several ways without sucess. I hope some of you can drive me to the right direction or show me an example that I can apply to my project.

    Thanks in advance
    Attached Thumbnails Attached Thumbnails TorqueDBRelationship.jpg  

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What exactly are you trying to do?
    If you build Fasteners, I would have expected a Fastener Table.
    You seem to have "lookup type tables" for all attributes, but no Fastener Table.

    But since I have no idea of what your tables represent, I could be way off base.

  3. #3
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12
    Hi, what I am trying to do is save all data information related to torque values for a specific characteristic. These are the different caracteristics I must consider:

    Type of material where the fastener will be installed (TypeOfMaterial)
    Type of installation (InstallationType)
    Type of fastener used (FastenerType)
    Chemical treatment used on the fastener (FastenerTreatment)
    Size of the fastener used (Fastener Size)
    Torque value that must be applied (TorqueValue)
    Unit of measure (TorqueUnit)
    I attached a general example of the table I want to save into a database.
    Attached Thumbnails Attached Thumbnails TorqueTables.jpg  

  4. #4
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12
    Sorry for not to be clear enough, I do not build fasteners, I just use them, but I need to specify what torque value should be used according to all previous characteristics. It is like a selection table, but also I want to be able to enter new data that can be used later. I hope this can be useful to be more specific.

    I hope this can be useful to drive me what I want to do. Thanks for any help that can I use as reference.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I guess I'm missing something basic. I wasn't suggesting you build Fasteners, I was offering an opinion If you build Fasteners.
    Regardless, in my view you have all sorts of attributes about a Fastener, but no Fastener table. Perhaps in your case Fastener is just a multi-table relationship. Something has to bring these attributes together.

  6. #6
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12
    Do you mean that I could use a Fastener table and use the look up tables for all atributes use the Fastener table as the main table?
    If I use that concept how should I enter data on each table with the relationship between one main table and the lookup tables? I mean how can I enter data on different tables with relationship between them?
    I was thinking to use unbound controls so i can use the save button, new record button and delete button or could I use bound controls to make this task much easier and control data saving?

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Yes that was what I was thinking. Maybe FastenerType is your "Fastener table". Then set up relationships to your various lookups.
    See possible fastenerType in attached jpg/
    Attached Thumbnails Attached Thumbnails FastenerType.jpg  

  8. #8
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12
    I understand your suggestion, it look much logical thank you very much.
    Using that concept, how could I enter data into the related tables if i use a form with unbound controls? I have seen how can it be done with just only one table, but how can it be done when there are related tables so that one button save the data, add a record or delete it on all tables?

  9. #9
    JoelBR is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2012
    Posts
    12
    I used your concept "orange" and it worked great thanks.
    I still have the doubt about how can it be done when there are related tables so that one button save the data, add a record or delete it on all tables?

    I hope any help to know how to do this.
    Thanks for the help

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    You don't update many tables - you update 1 table at a time.
    Why don't you mock something up where you have many tables in a relationship.
    Add some data, and see for yourself what happens.

    If you are concerned, or your application demands that several tables must all get updated, then you should investigate Transaction Processing (Begin Transaction, End Transaction)

    The best way to learn is to set up an experiment - sample tables, sample data even a sample form with sample controls.
    Best approach is to write down what you plan to do, and what you think should happen - then test it and see if what you expected is exactly what happens. If not, you've learned something that doesn't work for some reason, investigate - come to the forum with details of what you did, what happened....
    Last edited by orange; 11-16-2012 at 05:50 PM. Reason: spelling

  11. #11
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114
    Quote Originally Posted by orange View Post
    You don't update many tables - you update 1 table at a time.
    ............
    I've never understood why this is so. In the single-record append query:

    INSERT INTO target [(field1[, field2[, …]])] VALUES (value1[, value2[, …])

    "target" can be a query. So if the table relations are set up properly, why can't the desired multi-table fields be appended in a single statement? I mean, if that same "target" query were the recordsource for a form, new records could be added to the respective tables via the form, no? What am I missing?

    -Ron

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

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

Similar Threads

  1. Replies: 4
    Last Post: 04-26-2012, 11:04 AM
  2. Query on related tables question
    By jpkeller55 in forum Access
    Replies: 12
    Last Post: 09-28-2010, 07:18 PM
  3. Query with related tables question
    By jpkeller55 in forum Access
    Replies: 4
    Last Post: 09-25-2010, 04:29 AM
  4. 3 Related Dependent Tables
    By jbarrum in forum Access
    Replies: 0
    Last Post: 11-17-2009, 11:27 AM
  5. Split a table into related tables
    By triley01 in forum Database Design
    Replies: 1
    Last Post: 03-12-2009, 02:38 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