Hi. I have two tables: tbl_Solicitations and tbl_Comments. They are linked in a one-to-many relationship by the fied ID (autonumber;integer). The purpose of tbl_Comments is to hold multiple updates added about each solicitation listed in tbl_Solicitations.
I then have a main form, frm_Solicitations (based off of tbl_Solicitations) with 2 subforms in it: frm_SubViewComments and frm_SubAddComments (both based off of tbl_Comments).
frm_SubViewComments is a form in table view that simply shows comments that have been added about the solicitation and frm_SubAddComments is a text form with a submit button where the user can add a new comment.
What I want to have happen is a user can go in and create a record for a new solicitation in tbl_Solicitations. Then can input a comment/update in frm_SubAddComments, hit submit and it will automatically show up in the table above it, frm_SubAddComments. Then periodically, a user can go in and add new updates/comments to the record and still be able to see all previous comments/updates in frm_SubViewComments above.
When I create a new record in frm_Solicitations, a new ID (autonumber) is created after I update the first thing on the form. However, the ID is not being updated in frm_SubAddComments to match; it just continues to say "(New)". This is causing a problem for 4 reasons:
1) When I type in a comment and hit 'Submit', the comment is being added to tbl_Comments, but it is not updating on frm_SubViewComments and isn't showing up in the table.
2) The ID field in tbl_Comments is not being updated to match the ID field in tbl_Solicitations.
3) All comments for all solicitations are showing up on each solicitation. (ei. Solicitation 9 shows comments from Solicitations 2 and 3)
4) When I try to add another record, I get the error "The Microsoft Access database engine cannot find a record in the table_Solicitations' with key matching field(s) 'ID'.
I'm not sure if this has to do with how I have the relationship set up between the ID fields or if it has to do with needing an update event taking place in tbl_SubAddComments or what.
Any help would be appreciated. I have attached an image of my form so you can get a better idea of what I have going on.
Thanks!
Staci – Using Windows 7, Microsoft Office 2007 & Crystal Reports Version 10
I then have a main form, frm_Solicitations (based off of tbl_Solicitations) with 2 subforms in it: frm_SubViewComments and frm_SubAddComments (both based off of tbl_Comments).
frm_SubViewComments is a form in table view that simply shows comments that have been added about the solicitation and frm_SubAddComments is a text form with a submit button where the user can add a new comment.
What I want to have happen is a user can go in and create a record for a new solicitation in tbl_Solicitations. Then can input a comment/update in frm_SubAddComments, hit submit and it will automatically show up in the table above it, frm_SubAddComments. Then periodically, a user can go in and add new updates/comments to the record and still be able to see all previous comments/updates in frm_SubViewComments above.
When I create a new record in frm_Solicitations, a new ID (autonumber) is created after I update the first thing on the form. However, the ID is not being updated in frm_SubAddComments to match; it just continues to say "(New)". This is causing a problem for 4 reasons:
1) When I type in a comment and hit 'Submit', the comment is being added to tbl_Comments, but it is not updating on frm_SubViewComments and isn't showing up in the table.
2) The ID field in tbl_Comments is not being updated to match the ID field in tbl_Solicitations.
3) All comments for all solicitations are showing up on each solicitation. (ei. Solicitation 9 shows comments from Solicitations 2 and 3)
4) When I try to add another record, I get the error "The Microsoft Access database engine cannot find a record in the table_Solicitations' with key matching field(s) 'ID'.
I'm not sure if this has to do with how I have the relationship set up between the ID fields or if it has to do with needing an update event taking place in tbl_SubAddComments or what.
Any help would be appreciated. I have attached an image of my form so you can get a better idea of what I have going on.
Thanks!
Staci – Using Windows 7, Microsoft Office 2007 & Crystal Reports Version 10