A
AntonioMachado
I have 2 tables:
tblProject (ProjectID, ProjectName fields)
tblActivities (ProjectActivityID, ProjectActivity, ProjectID)
This last table was made using table wizard and telling it that there was a
relationship with tblProject.
question 1) The wizard replicated the ProjectID field in tblActivities. Is
this what we call a "foreign key"?
I used Form wizard to create a form that has a subform. User navigates
through Projects on the main form and the subform shows the ProjectActivity
field. Then, user can input/delete activities. Form is based on tblProjects
and suform is based on tblActivity. Ok, this works perfectly.
BUT, what I want to do is the following:
Currently, project field is a textbox on the main form and the user navigates
through projects using the form record navigators (Access arrow buttons on
the bottom of the form).
I want the user to select the project from a combo and automatically bring
the subform info (activity(ies)).
That's where I'm stuck. I was able to change the textbox to combobox. BUT now
when I choose a project on the combo, instead of going to that project record,
Access substitutes the current project with the project I chose on the combo.
Example: Let's say I have Project1 (ID = 1) and Project2 (ID = 2).
When I open the form, it shows Project1 on the form and Project1 activities
on the subform.
When I use the combo and select Project2, instead of going to that project's
record (ProjectID = 2 and ProjectName = Project2) it CHANGES Project1 info.
Now ID = 1 became Project2 on the ProjectName field.
Database looses all consistency. I "kill" Project 1 and now I have two
"Project2".
question 2) How to make this combo work?!?
Thanks
Antonio Machado
tblProject (ProjectID, ProjectName fields)
tblActivities (ProjectActivityID, ProjectActivity, ProjectID)
This last table was made using table wizard and telling it that there was a
relationship with tblProject.
question 1) The wizard replicated the ProjectID field in tblActivities. Is
this what we call a "foreign key"?
I used Form wizard to create a form that has a subform. User navigates
through Projects on the main form and the subform shows the ProjectActivity
field. Then, user can input/delete activities. Form is based on tblProjects
and suform is based on tblActivity. Ok, this works perfectly.
BUT, what I want to do is the following:
Currently, project field is a textbox on the main form and the user navigates
through projects using the form record navigators (Access arrow buttons on
the bottom of the form).
I want the user to select the project from a combo and automatically bring
the subform info (activity(ies)).
That's where I'm stuck. I was able to change the textbox to combobox. BUT now
when I choose a project on the combo, instead of going to that project record,
Access substitutes the current project with the project I chose on the combo.
Example: Let's say I have Project1 (ID = 1) and Project2 (ID = 2).
When I open the form, it shows Project1 on the form and Project1 activities
on the subform.
When I use the combo and select Project2, instead of going to that project's
record (ProjectID = 2 and ProjectName = Project2) it CHANGES Project1 info.
Now ID = 1 became Project2 on the ProjectName field.
Database looses all consistency. I "kill" Project 1 and now I have two
"Project2".
question 2) How to make this combo work?!?
Thanks
Antonio Machado