how search for a record in multiple tables

Terkpeh1990

Registered User.
Local time
Today, 19:29
Joined
Nov 18, 2017
Messages
24
hi
i have five tables namely
team a
team b
team c
team d
team e

a staff can find himself in all the teams .
is there a way that when i query the staff name , the system should be able to open a form showing that staff's name in all the team he is in .

need help please . thanks
 
With the structure you have there, I think you would need to use a union query, that is the same query 5 times, just changing the table name?

I'd have a staff table, a team table and a junction table to link the two.
At a minimum have the team table with a field for team and have each staff member in the table multiple times. Then it would be one query that shows all the teams a staff member is in.

HTH
 
Agree with Gasman
You are creating a spreadsheet like structure which doesn't work well in a database

Suggest you read up on normalisation
 
thanks guys. guess will have to restructure the tables again
 

Users who are viewing this thread

Back
Top Bottom