Hi
I have two tables, "tblCase" and "tblProject", they are related in a one-many relationship, so that I can have many Projects for each record in "tblcase".
"tblCase" is parent
"tblProject" is child.
- I have a form with a listbox "lstProject", that shows the records in "tblProject".
- In another form I have a listbox "lstCase", that shows the records in "tblCase".
- The records shown in "lstProject" are children of the selected record in listbox "lstCase".
Now, I want to add a new child record in "tblProject" , which is related to the selected record "lstCase".
In order to do that I have some textfields where I can put in the values I want in the new child record of "tblProject". When I press an OK button, the values should be stored as described.
How can I do that?
I guess I need some vba code, which is executed as I press the OK button.
I have two tables, "tblCase" and "tblProject", they are related in a one-many relationship, so that I can have many Projects for each record in "tblcase".
"tblCase" is parent
"tblProject" is child.
- I have a form with a listbox "lstProject", that shows the records in "tblProject".
- In another form I have a listbox "lstCase", that shows the records in "tblCase".
- The records shown in "lstProject" are children of the selected record in listbox "lstCase".
Now, I want to add a new child record in "tblProject" , which is related to the selected record "lstCase".
In order to do that I have some textfields where I can put in the values I want in the new child record of "tblProject". When I press an OK button, the values should be stored as described.
How can I do that?
I guess I need some vba code, which is executed as I press the OK button.