Results 1 to 2 of 2

Thread: 2 line Validation situation...HELP...plz!!!

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2000
    Location
    London, UK
    Posts
    39

    Wink 2 line Validation situation...HELP...plz!!!

    Hey,

    I'm trying to set up a validation behind a text box in access and I want it to find certain values in a table. Unfortuantly I am having a problem with this piece of code a few lines long:

    I am trying to perform a procedure which checks whether a customer in a table already exists by comparing First, Last Name and Post Code. Unfortunatly I have a probelm in the FirstName variable. This is what I have tried:



    FirstName = DLookup("FName", "CustomerInfo", "[CustomerInfo]![CustID] = LCustomerID")

    Where
    LCustomerID = DLookup("CustID", "CustomerInfo", "[CustomerInfo]![LName] = Forms![Add_Customer]![txtLName]")

    But this did not work So I tried this:

    FirstName = DLookup("FName", "CustomerInfo", "[CustomerInfo]![CustID] =(DLookup("CustID", "CustomerInfo", "[CustomerInfo]![LName] = Forms![Add_Customer]![txtLName]"))")

    Still does not work

    Can anyone help me with this problem? I will be very greatful


  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Last edited by chrisjk; May 26th, 2001 at 02:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width