D
deb
I have a form with a button that copies data on main form and sub forms
and enters this into the tables. I used the instructions from the link
below and it works great!!
http://support.microsoft.com/kb/208824
I have 2 tables and a form with a sub form.
Table1 " tCustImpacts" has fields ...
CustImpactID - Autonumber - common to Table2
KPIProjID - Number
KPIPMID - Number
ReportDTID - Number
Scope - Memo
Invoicing - Text
Table1 "tCustImpacts" is used for the main form.
Table2 "tCustImpactsDetails" has fields...
DetailsID - Autonumber
CustImpactsID - Number - common to Table1
CustImpactCatID - Number
CustImpactDetails - Memo
Table2 "tCustImpactsDetails" is used for the sub form
When the save button is clicked I need to NOT save if there are records
that already exist in Table1 that have the common fields of
KPIProjID - Number
KPIPMID - Number
ReportDTID - Number
The problem comes is that this allows duplicate data.
I need the KPIProjID , KPIPMID and ReportDTID to be a unique record set
and not allow the tables to copy until the ReportDTID is changed to a
new date.
How can I block the SAVE function if there is a duplicate recordset
until the ReportDTID is changed (which creates a unique recordset)?
KPIPMID KPIProjID ReportDTID Scope
Scott (1) Dallas (32) Jun06(6) no
Dave (2) Houston (49) Jul06 (7) no
Ben (3) Austin (74) Jul06 (7) yes
Scott(1) Dallas(32) Jul06 (7) yes
Therefore the record cannot be saved because this data (KPIPMID,
KPIProjID and ReportDTID, (Scope and other fields are not part of the
criteria)) already exists in table.
I need the record to not be saved and a message to change the report
date.
and enters this into the tables. I used the instructions from the link
below and it works great!!
http://support.microsoft.com/kb/208824
I have 2 tables and a form with a sub form.
Table1 " tCustImpacts" has fields ...
CustImpactID - Autonumber - common to Table2
KPIProjID - Number
KPIPMID - Number
ReportDTID - Number
Scope - Memo
Invoicing - Text
Table1 "tCustImpacts" is used for the main form.
Table2 "tCustImpactsDetails" has fields...
DetailsID - Autonumber
CustImpactsID - Number - common to Table1
CustImpactCatID - Number
CustImpactDetails - Memo
Table2 "tCustImpactsDetails" is used for the sub form
When the save button is clicked I need to NOT save if there are records
that already exist in Table1 that have the common fields of
KPIProjID - Number
KPIPMID - Number
ReportDTID - Number
The problem comes is that this allows duplicate data.
I need the KPIProjID , KPIPMID and ReportDTID to be a unique record set
and not allow the tables to copy until the ReportDTID is changed to a
new date.
How can I block the SAVE function if there is a duplicate recordset
until the ReportDTID is changed (which creates a unique recordset)?
KPIPMID KPIProjID ReportDTID Scope
Scott (1) Dallas (32) Jun06(6) no
Dave (2) Houston (49) Jul06 (7) no
Ben (3) Austin (74) Jul06 (7) yes
Scott(1) Dallas(32) Jul06 (7) yes
Therefore the record cannot be saved because this data (KPIPMID,
KPIProjID and ReportDTID, (Scope and other fields are not part of the
criteria)) already exists in table.
I need the record to not be saved and a message to change the report
date.