Fields need to be blank

El Jagang

Registered User.
Local time
Today, 16:21
Joined
Aug 21, 2015
Messages
24
I've built a database where my employer can keep track of the 131 positions he is responsible for, along with the information for past and current staff.

I created a field in the Positions table called [Currently_Filled], and the options are "Yes", "No", and "TBA" (To Be Assigned). The "No" option will probably not be used; I created it just in case my employer wants to keep historical information even if certain positions are eliminated. Otherwise, their status is either "Yes" or "TBA", which means they will show up in the appropriate query and report (Current Staff or Staffing in Progress).

In the Staff table, I created a field called [Current], where the entry can only be "Y" or "N", also to enable historical records to be kept, as each position will eventually have multiple staff who will have held them.

Both tables are linked by the Position Number. I used a Left Join (to include all Positions and only the Staff where the joined fields are equal) as my database relationship.

The problem I've just encountered, now that some of the staffers have departed and the positions have gone back to "TBA" status, is that those now-empty positions still show the past staffers' information in my query called "All Positions" (which is meant to show all 131 positions in the same place, with staffing info for filled positions and with blank staff info for positions not currently filled). Since those positions are empty, the position information should show up, but the staff information should be blank (instead of showing the previous staffer's information).

How can I make this happen without losing the historical information?

Sorry about the long-winded post; I just wanted to be as clear as possible as to the function of the database.
 
I don't think you should have the Currently_Filled field. I believe that is a calculated value and can be determined by logically looking at data with this structurce:

Staff
Staff_ID - autonumber, primary key
Staff_FName - text, First Name
Staff_LName - text, Last Name
Staff_Hire - date, date hired
...


Positions
Pos_ID - autonumber, primary key
ID_Department - number, foreign key to Departments table
Pos_Title - text, title of position
Pos_Desc - text, description of position
Pos_Exempt - yes/no, is exempt position
...


StaffPositions
ID_Pos - number, foreign key to Positions
ID_Staff - number, foreign key to Staff
SP_Start - date, date person started position
SP_End - date, date person ended position



I believe that will provide historical data, allow you to generate a current roster and determine which positions are open.
 

Users who are viewing this thread

Back
Top Bottom