I put this command:
DoCmd.RunCommand acCmdSaveRecord
on the after update of the first field on a subform. I do that because sometimes the user will enter just 1 peice of information, and then want to hit a subform button that is going to allow them to enter "sub" record information for that "sub" record.
so Main form
Subform
Subform button that is just for the current subform record.
The problem is that the popup subform can't open unless it has a subform ID to tie it to. For that reason I try to trigger saving the record the minute a user starts to create one.
This is giving me an error that says:
Run-time error '3146':
ODBC--call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server] The INSERT statement conflicted with the FOREIGN KEY constraint "tblContractDeal_tblDeal". The conflict occured in the database "CompanyContractsBE", tabl "dbo.tblDeal", column "PKDealID" (#547) [Microsoft][ODBC SQL Server Driver][SQL Server] The
and that's it. The funny thing is that the first field is actually FKPartyType, which is not what the error is mad at.
Wierd. Anyone seen this kind of thing before, or know how to trigger a safe of a subrecord as soon as it starts?
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot
DoCmd.RunCommand acCmdSaveRecord
on the after update of the first field on a subform. I do that because sometimes the user will enter just 1 peice of information, and then want to hit a subform button that is going to allow them to enter "sub" record information for that "sub" record.
so Main form
Subform
Subform button that is just for the current subform record.
The problem is that the popup subform can't open unless it has a subform ID to tie it to. For that reason I try to trigger saving the record the minute a user starts to create one.
This is giving me an error that says:
Run-time error '3146':
ODBC--call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server] The INSERT statement conflicted with the FOREIGN KEY constraint "tblContractDeal_tblDeal". The conflict occured in the database "CompanyContractsBE", tabl "dbo.tblDeal", column "PKDealID" (#547) [Microsoft][ODBC SQL Server Driver][SQL Server] The
and that's it. The funny thing is that the first field is actually FKPartyType, which is not what the error is mad at.
Wierd. Anyone seen this kind of thing before, or know how to trigger a safe of a subrecord as soon as it starts?
Thanks!
misscrf
It is never too late to become what you could have been ~ George Eliot