1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access Subforms???

Discussion in 'Business Applications' started by MeinDCIC, Jan 22, 2002.

Thread Status:
Not open for further replies.
  1. MeinDCIC

    MeinDCIC Thread Starter

    Jan 18, 2001
    My knowlege of Access is not what it should be so I need some advice:

    Here we go:

    I am creating a db of employees and the classes they have taken - My thought is that the db would have 2 table (or more) the first one would be with the emp. info (name, telephone #, SSN...) the second would be with YES/NO check boxes for the types of classes.

    Now I want to combine these two - So here is what I think I need to do (I could be wrong - not sure!!) I make a form with the EMP info and than within it create a subform with the check boxes. Is this right?

    If this is how you do it how do I get rid of the controls at the bottom of the subform and how do I make it just one row of checkboxes - I can always send you my test db so you can look at it.
    Thanks in advance
  2. downwitchyobadself


    Oct 13, 2000
    Hi. Your intuition for two tables is good, but I'd take some issue with the "checkboxes" approach to table 2. You're talking, if I understand you correctly, about making a field for each class? Well, in "good" relational db design, that is one kind of data, and therefore you should have a field which is, for example, ClassID, which links to a lookup table containing the names of the classes, and not one field for each class.

    The reason for this is simple. Say I have Math, Physics, and Gym as choices, and then one day I decide I want to include English too. (Good idea :D) Well, in your scenario, you have to go back and add a whole new field, new check box, etc., and redesign all your forms and reports to include it. In the second scenario, you just add a record to the lookup table, and boom, it's available to all your forms and reports with no changes. This article gives you some download stuff that will explain this more clearly, and the example dbs shipped with Access help too.

    Now, as far as how to add the classes goes, the most basic solution possible is to do it with a simple datasheet subform, based on your table2, Master-Child linked on StudentID or whatever you're calling your primary key. In the datasheet is a combo box whose RowSource is linked back to the class lookup table I mentioned above. (You might see the other thread floating around here called "New Access 2000 question" for more stuff about combo boxes, it links to the same MS article.) Then the user just has to add one record per class, very quick and easy.

    Let us know how much of this helps.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/65928

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice