> Thanks that helped a lot.
> I tweaked the code and got the correct results (I didn't want it to go to
[quoted text clipped - 56 lines]
> > >
> > >Thanks.
Hi Neil,
Im still new to this so bear with me,
Id try changing the "Qry_RoomSub" portion of the code to the actual name of
your Table, i dont think it would work with a Query.
You could also try just using:-
**********Code Start******************
If Not IsNull(DLookUp("[Field name to lookup in on table]", [NAME OF YOUR
TABLE], _
"[Field name to lookup in on table] = '" & Me![cboTimeIn]& "'") Then
MsgBox "This Time already exists, Please input another time to avoid
overlapping", vbOKOnly
Cancel = True
End If
**********Code End****************
Let me know if it works out,
Chris
>actually it didn't work - it displays the messagebox regardless of the
>input.
[quoted text clipped - 30 lines]
>> > >
>> > >Thanks.
Chris B - 24 Oct 2005 13:19 GMT
Another simple way would be to make the field that the [cboTimeIn] is bound
to in the Table, Indexed,
ie In the Design view of your table, find the field for cboTimeIn and where
it says INDEXED put Yes-No Duplicates.
>Hi Neil,
>Im still new to this so bear with me,
[quoted text clipped - 19 lines]
>>> > >
>>> > >Thanks.
Neil M - 25 Oct 2005 13:36 GMT
OK thanks i'll try that and let you know.
> Another simple way would be to make the field that the [cboTimeIn] is bound
> to in the Table, Indexed,
[quoted text clipped - 24 lines]
> >>> > >
> >>> > >Thanks.