Results 1 to 2 of 2
  1. #1
    Dansbo is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    3

    Validate field against another field

    Hi,



    Excuse med, but I have been looking through the net at no avail.

    I have created a for in a database where I want to validate the data given by a user against another field.

    I.e. A table has been created for users to type in manually installed software om a given computer name. Now I want to have access to check the given computer name against another field in another table I have made where all computer names are listed.

    I have tried dlookup and just using =.

    Could someone please help?

    THX in advance

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    you can make it a pick list, so the user can ONLY pick correct computer names.
    or
    once entered, validate the entry using DLOOKUP,
    user enters in txtPCname,
    afterupdate event checks the entry,
    if txtPCname <> Dlookup("[pcName]", "table", "[pcName]='" & txtPCname & "'" then msgbox "pc not found"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 07-11-2015, 12:32 AM
  2. Replies: 3
    Last Post: 06-20-2014, 02:30 PM
  3. Validate Field Containing Date AND Time
    By tndinnc in forum Access
    Replies: 2
    Last Post: 04-25-2013, 11:11 AM
  4. Validate a field
    By tweety in forum Forms
    Replies: 19
    Last Post: 03-29-2013, 04:06 PM
  5. Replies: 1
    Last Post: 09-05-2012, 02:49 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
  •  
Other Forums: Microsoft Office Forums