G
Guest
Good day,
I have a main form "frmCostAndRevenue" which includes the CARID (PK),
CARDate and DeptNbr. I have a subform "fsubCostAndRevenue" (linked via
CARID), which includes all the details (one field being cboEquipmentId) for
the particular reporting period (CARDate).
What I need to be able to do is, allow duplicate Equipment Id Nbrs
(cboEquipmentId) in the table (tblCostAndRevenueDetail), but not within the
same reporting period. ie: User enters R1150 for March 31, 2006 reporting
period and then tries to enter that same unit again for the same reporting
period I want a MsgBox telling them, This Unit alreadys exists for this
reporting period. Choose another number).
I've tried to adapt code I've found in this forum but have not been
succesful as I cannot figure out how to include the date criteria.
If anyone can shed some light on this I would truly greatful.
Thanks and have a great day.
I have a main form "frmCostAndRevenue" which includes the CARID (PK),
CARDate and DeptNbr. I have a subform "fsubCostAndRevenue" (linked via
CARID), which includes all the details (one field being cboEquipmentId) for
the particular reporting period (CARDate).
What I need to be able to do is, allow duplicate Equipment Id Nbrs
(cboEquipmentId) in the table (tblCostAndRevenueDetail), but not within the
same reporting period. ie: User enters R1150 for March 31, 2006 reporting
period and then tries to enter that same unit again for the same reporting
period I want a MsgBox telling them, This Unit alreadys exists for this
reporting period. Choose another number).
I've tried to adapt code I've found in this forum but have not been
succesful as I cannot figure out how to include the date criteria.
If anyone can shed some light on this I would truly greatful.
Thanks and have a great day.