Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Alert about exi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 30193 of 30680
Post > Topic >>

Alert about existing record

by senditontome@[EMAIL PROTECTED] May 8, 2008 at 02:20 AM

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
 




 5 Posts in Topic:
Alert about existing record
senditontome@[EMAIL PROTE  2008-05-08 02:20:04 
Re: Alert about existing record
Roger <lesperancer@[EM  2008-05-08 02:28:17 
Re: Alert about existing record
senditontome@[EMAIL PROTE  2008-05-08 04:16:01 
Re: Alert about existing record
Roger <lesperancer@[EM  2008-05-09 03:43:17 
Re: Alert about existing record
senditontome@[EMAIL PROTE  2008-05-09 03:49:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 0:37:30 CDT 2008.