-----Original Message-----
Jim,
Thanks again.  I re-did the query and in the subform, chaged the AfterUpdate
event to run the macro.  I opened the form and typed in a date that would
conflict and it accepted it, with no message box.  In the expression, >=
[Forms]![Mainformname]![subformname].[Form]![startdate], is .[Form] literal
or am I supposed to put another form name here?
My main form is frmEnvironments-ASSIGN and my two subforms are
sfrmMegaTrainIDs-ASSIGN and sfrmAssignments-ASSIGN.  The Assignments subform
contains the start and end date fields.  This is how I typed the expression:
	
	
 [Forms]![frmEnvironments-ASSIGN]![sfrmAssignments-ASSIGN].[Form]![StartDate]
Does this look right to you?  Thanks again for your help!
	
		
			
				Jim/Chris said:
			
		
	
	
		
		
			I did not know the date was in a subform.  Try this in your
query criteria for the start date
= [Forms]![Mainformname]![subformname].[Form]![startdate]
and in the criteria for the enddate in the query put
<= [Forms]![Mainformname]![subformname].[Form]![startdate]s
I like to use the expression builder to locate the
startdate.  It prevents typing errors.
Jim
-----Original Message-----
Create a query.
in your query criteria of the for the start date put
= [Forms]![NameOfForm]![startdate]
and in the criteria for the enddate in the query put
<= [Forms]![NameOfForm]![stardate]
Create a macro. In the conditions put
DCount("*", "queryname") > 0
In the action put
Msgbox
in the message put "This date is taken"
Jim
-----Original Message-----
I have created an assignments form in which Training IDs
are being reserved.
There is a StartDate and EndDate field.  When a user
enters a StartDate that
is equal to a StartDate in a porevious record OR the
StartDate is in between
the StartDate and EndDate of a previous record, a message
box displays that
the StartDate is invalid and a different StartDate needs
to be entered.  The
message box should appear after entering the StartDate and
before moving on
to the next field.
Any help is greatly appreciated!
--
GEP
.
.
		
		
	 
.