Hi,
Does anybody know how to check for overlapping data in a before update event? An example: table one has a clients (tblclients.clientID) and table two has a cases (tblcase.caseID) with a start date (tblcase.startdate) and an end date (tblcase.enddate). When a user looks up a combo box to assign a client from table one (tblclients.clientID) to a case in tblcase and assign a unique date peroid with the startdate and enddate how do you stop the user from adding the client to another case when they are already assigned to a case that spans some part of the same time peroid?
e.g. Smith is assigned to case ID 1, startdate 1/2/2009 to enddate 5/2/2009 and user wants to assign the same client Smith to case ID 2, startdate 3/2/2009 to enddate 7/2/2009.
P.S. ( the same client can be assigned to another case as long as the time peroid does not over lap.)
It can be done in VBA but I'm struggling to get it to work.
Thanks for your help in advance.
Cheers,
Andrew
Does anybody know how to check for overlapping data in a before update event? An example: table one has a clients (tblclients.clientID) and table two has a cases (tblcase.caseID) with a start date (tblcase.startdate) and an end date (tblcase.enddate). When a user looks up a combo box to assign a client from table one (tblclients.clientID) to a case in tblcase and assign a unique date peroid with the startdate and enddate how do you stop the user from adding the client to another case when they are already assigned to a case that spans some part of the same time peroid?
e.g. Smith is assigned to case ID 1, startdate 1/2/2009 to enddate 5/2/2009 and user wants to assign the same client Smith to case ID 2, startdate 3/2/2009 to enddate 7/2/2009.
P.S. ( the same client can be assigned to another case as long as the time peroid does not over lap.)
It can be done in VBA but I'm struggling to get it to work.
Thanks for your help in advance.
Cheers,
Andrew