Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2007, 05:22 PM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default checkboxes to a junction table

I have a form where information on a person is entered (e.g., first name, lastname, dob, etc.)

I want to categorize the people by the type of person that they are on this form (e.g., employee, contractor, agent, salesman, etc.)

There are around a dozen categories of people coming from a lookuptable, tluPersonType.

The tricky part is that sometimes a person is a member of multiple categories (e.g., he might be an employee and a salesman) so I need to determine how to on one form let a person select multiple person categories.

The tables involved are:

tblPeople
PersonID - PK
PersonTypeID
SalutationTypeID
FirstName
MiddleName
LastName
SSN
Password

tluPersonType
PersonTypeID - PK
PersonType

tjxPersonPersonType
PersonPersonTypeID - PK
PersonTypeID - FK
PersonID - FK

At present, I have a subform on the main form and have set the ctrl src of the subform to tjxPersonPersonType.

I suspect each of the checkboxes needs to be with a control source of PersonPersonTypeID and then have a default value set to something like 1,2,3,...number for each PersonTypeID.

However, I can't quite get it to work. Can anyone see what I am doing wrong or offer any suggestions?

Any advice will be greatly appreciated.



 
Old January 22nd, 2007, 08:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

It seems to me that this is a deign issue. The person type should have mutually exclusive catergories.

For example, it goes without saying that a salesperson is also an employee, otherwise they couldn't be one of your salespeople.

Perhaps having a person type category, and then a departmental look up will clear this up.

Anyway, if a person is an employee, you can show the department combo box and let the user select the Sales department, or something like that.

HTH

mmcdonal
 
Old January 22nd, 2007, 08:28 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Or s "design issue" =)

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a junction table sarah lee SQL Server 2000 1 January 10th, 2007 05:18 PM
Loop through checkboxes Godko Visual Studio 2005 1 April 9th, 2006 11:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.