G
Guest
Can anyone please help me? I am a greeny Database developer. I created a
delete button using the button wizard but when I click on it I get the
following message "The Record cannot be deleted because table ‘tblCLines’
includes related records.cannot delete a record." I have eight other sub
forms and they all delete the reodrds fine. But this fsubCLines does not
delete the record. Any ideas why?
I have a table called tblBatchHeader and and other table called tblCLines.
The their is a frmBatchHeader and a subform in a tab control called
fsubCLines. The sub form has three fields. lngzPatientNumber (int) is
manually typed, chrFieldCodes (txt) is a combo box that is populated using
the following SQL statement:
SELECT tblFieldCodes.chrFieldCodes AS Code,
tblFieldCodes.chrFieldCodesDescription AS Description FROM tblFieldCodes;
and chrNewData (txt) that is populated with values from another table and is
triggered by whaterever value it slected in the chrFieldCodes it used the
following SQL statement:
SELECT tblNewData.chrNewData AS [Data Value], tblNewData.chrNewDataFormat AS
[Data Format], tblNewData.chrNewDataDescription AS Description,
tblNewData.chrFieldCodes FROM tblNewData WHERE
(((tblNewData.chrFieldCodes)=Forms!frmBatchHeader!ChildfsubCLines.Form!cboFieldCodes));
delete button using the button wizard but when I click on it I get the
following message "The Record cannot be deleted because table ‘tblCLines’
includes related records.cannot delete a record." I have eight other sub
forms and they all delete the reodrds fine. But this fsubCLines does not
delete the record. Any ideas why?
I have a table called tblBatchHeader and and other table called tblCLines.
The their is a frmBatchHeader and a subform in a tab control called
fsubCLines. The sub form has three fields. lngzPatientNumber (int) is
manually typed, chrFieldCodes (txt) is a combo box that is populated using
the following SQL statement:
SELECT tblFieldCodes.chrFieldCodes AS Code,
tblFieldCodes.chrFieldCodesDescription AS Description FROM tblFieldCodes;
and chrNewData (txt) that is populated with values from another table and is
triggered by whaterever value it slected in the chrFieldCodes it used the
following SQL statement:
SELECT tblNewData.chrNewData AS [Data Value], tblNewData.chrNewDataFormat AS
[Data Format], tblNewData.chrNewDataDescription AS Description,
tblNewData.chrFieldCodes FROM tblNewData WHERE
(((tblNewData.chrFieldCodes)=Forms!frmBatchHeader!ChildfsubCLines.Form!cboFieldCodes));