Form and subform

lamha

Registered User.
Local time
Today, 05:48
Joined
Jun 21, 2000
Messages
76
I'm trying to create a form and a subform that allow the user to enter their work hours and work day on project(s) that they are assigned.
I have 4 tables: Projects (a list of all projects), People (a list of all employee), Assignments (a list of projects that are assigned to certain employees, including the dead lines), and Time (consists of PersonID, ProjID, Workday, and Hours).
I want the main form to display a combo box of PersonName (list of employee who are assigned to some projects). But the PersonID should be recorded into the tblTime instead of PersonName.
The subform would consist of the other 3 fields. Again, I want a combo box for ProjID that list all the projName that are assigned to the person you selected above.
The problem is, my combo box for projID only display list of ProjName for the first person that appear when I open the form. It wouldn't change when I select another PersonName.
1 other problem. When I select another person name, then select a projName that is not assigned for this person; tblAssignments is updated saying that person is assigned to the same project with the first person.
Could someone please help? I'm not much familiar with Access. I would appreciate a lot. Thanks in advance.
 
if i understand you right do following:

1)source of the list of projects must:
"select ..... where PersonId=forms![YOU_FORM]![NAME_OF_PEOPLE_LIST]"

2)you must write VB code for PEOPLE_LIST UFTER UPDATE:
...
me![PROJECT_LIST_NAME].REquery
...

3) MOST DIFFICULT! YOU MUST DETERMINE CHILD FIELDS FOR SUB FORM THEY ARE:

[PERSON_ID]=[NAME_OF_PEOPLE_LIST]
[ProjID]=[PROJECT_LIST_NAME]


if you dont understand me you may ask me.
glad to answer
 
Thanks. It worked.
 

Users who are viewing this thread

Back
Top Bottom