Results 1 to 2 of 2
  1. #1
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24

    ?? Run a query on exit of field with message ??

    Hi

    I have a form where I wwould like to run a query on exit of a field to check if the data exists, then close the form



    Example::
    User enters - Program, Month and Year

    On exit of year a query will run which will check if a record exists with that program month and year, if it does then messagebox "Exists" and close form otherwise keep going


    Thanks in Advance
    Joe

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    A DLookup() can accomplish this.

    If Not IsNull(DLookup("ID", "tablename", "filter criteria here")) Then
    ...
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Error Message associated with Field
    By CQCDave in forum Access
    Replies: 15
    Last Post: 11-15-2014, 10:46 AM
  2. Replies: 2
    Last Post: 04-04-2013, 03:13 PM
  3. Replies: 3
    Last Post: 03-06-2013, 03:06 PM
  4. Replies: 2
    Last Post: 12-20-2012, 03:06 PM
  5. Message in Field
    By supatsiri in forum Reports
    Replies: 0
    Last Post: 03-09-2009, 01:59 AM

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