Group membership question

timbl

Registered User.
Local time
Today, 13:09
Joined
Oct 15, 2011
Messages
32
Simple problem got me thinking

I need to create a simple database where I have a list of people, a list of groups and all I want to do is select which people belong to specific groups.
All I need is to create a form where I have a list of my people and a tick box next to the groups to show who belongs to which group.
Sounds simple, but I am new to this.
any help would be appreciated.
 
Re: Simple problem got me thinking

By doing it this way, you will be building the database incorrectly.

You need to have a properly normalized database and so you really shouldn't be using the checkboxes but instead you would use a subform and make your selections.

tblPersons
PersonID - Autonumber (PK)
FirstName
LastName

tblGroups
GroupID - Autonumber (PK)
GroupName - Text

tblPersonGroups
PersonGroupID - Autonumber (PK)
PersonID - Long Integer (FK)
GroupID - Long Integer (FK)

And then the Persons table would be the main form's record source (I left other fields out of it just to simplify the explanation) and the tblPersonGroups table would be the record source for a subform which would be on the main form.

A combo box on the subform would have its ROW SOURCE set to tblGroups for selecting each group to which a person belongs.

And that is the more proper way to build it so that you can actually get meaningful data back out.
 
I need to create a simple database where I have a list of boats, a list of boat classes and all I want to do is select which boats belong to specific classes.
All I need is to create a form where I have a list of my boats and a tick box next to the classes to show which boat belongs to which class.
Sounds simple, but I am new to this.
any help would be appreciated.
 
Re: Simple problem got me thinking

Thanks Bob
PK I guess is Primary Key
FK?
And what relationships?
 
FK is Foreign Key (which is a Primary Key in another table).

If you notice I use the same field names in each table so you can see how they link.

PersonID -----> PersonID
GroupID ------> GroupID
 
Hi Bob Thanks for your help the other day.
I am though stuck again!
I am trying to create a database for recording boat race results.
The set up is as follows...
There are boat classes which contain boats...
Classes have a number of series throughout the yaer which would consist of several races...
Each race has a number of entrants with respective results...

Everything is going okay except that when I try to create a form to select boats to enter a race from a series - which is itself part of a class and therefore should only have that classes boats to choose from - I cant seem to be able to create a dropdown box which only gives me boats from the specific class.

I hope this makes sense!

I have attached relationships screenshot.
Many thanks
 

Attachments

  • untitled.JPG
    untitled.JPG
    94.2 KB · Views: 78

Users who are viewing this thread

Back
Top Bottom