ComboBox question (1 Viewer)

mattP

Registered User.
Local time
Today, 16:31
Joined
Jun 21, 2004
Messages
87
Ok I hope this makes sense, I'll try to explain clearly

I have a database that is used by several teams, I have a simple loggin code, that I got form this site, where by the user details, team and level (user, manager, etc..) are captured and can be called at any time.

SO on the forms every team will use a combobox called "EscalationSource", which should look at a table for it's values.

However not all the teams use all the values and so I have built into the table a check list as per attached doc, to say whether that record is used by a certain team.

So how can I filter my form so only the records relevant to a persons team can be viewed, the global code for viewing your team ID is user.userteam.

Hope this makes some sort of sense

Thanks

MattP
 

Attachments

  • tableview.doc
    27.5 KB · Views: 112

MarkK

bit cruncher
Local time
Today, 08:31
Joined
Mar 17, 2004
Messages
8,188
I would create an additional table that defines the relationship between Escalation Sources and Teams. Tables briefly outlined...
Code:
[B]eSource Table[/B]
esID (PK)
Description

[B]eSourceTeam Link Table[/B]
'one record here for each valid eSource-Team connection
linkID (PK)
esID (FK)
teamID (FK)

[B]Team Table[/B]
teamID (PK)
TeamName

Then you can write SQL something like ...
Code:
SELECT t1.esID, t1.Description 
FROM tESource AS t1 INNER JOIN tESourceTeamLink AS t2 ON t1.esID = t2.esID
WHERE t2.teamID = [I]<parameter of teamID in question>[/I]
to drive your combo.
 

Users who are viewing this thread

Top Bottom