Hi,
As a relative Newbie, I'd appreciate a little assistance with an A2003
DB I'm trying to enhance.
This DB handles re****ts made by security staff on a ****ft by ****ft
basis based on two ****fts per day. The two relevant fields are called
Datum and ****ft.
I want to trigger an alert whenever the user tries to create a new
re****t when a re****t for that Datum / ****ft combination already
exists. Ideally the alert would be triggered in the After Update Event
in the ****ft. If the alert wasn't triggered then another form would
open so allowing the user to create a new re****t.
I have made a query called qryAlertExisting which produces distinct
Datum/****ft results and I wanted to use this with a bit of code I've
taken from another of my DB's which triggers an alert but is based on
searching one field only. What I want now is to modify this code to
consider two fields (Datum & ****ft) and to flag up if the proposed new
combination already exists.
The code is :-
If DCount("Datum","QryAlertExisting")<1 Then
DoCmd.OpenForm "FrmAddNewRe****t"
Else
MsgBox "A re****t already exists for that ****ft on that Date""
End if
Many thanks,
Yvonne