validation test

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Richardson (junk_at_sbcglobal.net)
Date: 08/27/04


Date: Fri, 27 Aug 2004 15:57:17 GMT

I have a form, frmMembership, based on a table, Membership, with 2 fields of
importance, Fn which references FirstName in the table and Ln which
references LastName in the table.
I want to be able to alert the person entering data that they may be
entering duplicate entries but I do not want to make this a 2 field key
because there are times when the first name - last name combination should
be repeated.

I would like to put a validation on the before update event of both the
first and last name fields that will compare the values to the table. If
that combination exists, I want a message box with an alert. From that
point I know the coding I need.

I used a similar test in another form, but it doesn't seem to work here.
This is the condition I have entered that doesn't work
Dlookup(True,"Membership","[FN]=Membership![FirstName] and
[LN]=Membership![LastName].

Thank you in advance for any assistance you can offer.

Lori



Relevant Pages

  • Re: validation test
    ... Private Sub Fn_AfterUpdate ... > references LastName in the table. ... > entering duplicate entries but I do not want to make this a 2 field key ... I want a message box with an alert. ...
    (microsoft.public.access.formscoding)
  • Re: stdout and stderr dont occur sequentially in Eclipse and Netbeans
    ... The references to System.out and System.err and ... the importance of the sequence make me wonder if ... I just found this odd behaviour in some IDEs and are curious to know ...
    (comp.lang.java.programmer)
  • Re: add web reference then point to wsdl
    ... >Importance: normal ... >Priority: normal ... >The guy at the place where they had the web service said everything's A-OK ... >> to right click on the References section in the Project Explorer and ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Steve Carroll does not know the difference between saving and quitting.
    ... Other than an alert that pops up in a properly designed app, ... There is no alert that pops up to tell you the program will quit... ... references it as "The Save Changes alert". ...
    (comp.sys.mac.advocacy)
  • Invalid References
    ... references -what does this mean and how can i fix? ... perhaps easier to cancel ... alert - how so? ...
    (microsoft.public.excel.worksheet.functions)