Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    214

    Unanswered: Code to alert records on another form

    I have a database where a user enters data into a form and if there is an existing record, there is a button they can click that opens a subform with the data. I need help with some code that would alert the user there is an existing record, possible making the button visible, or change background color, not really sure. I am drawing a blank on what I should use on the main form to trigger the event. I appreciate any help you can give.

    Mr. Blonde
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  2. #2
    Join Date
    Nov 2007
    Posts
    93
    would suggest .. make use of find duplicates query from the table
    and jst type in something as in vba

    BEEP

    u wil get a sound of a beep on same field

  3. #3
    Join Date
    Feb 2004
    Posts
    214

    ...

    Could you provide what the sample code might look like?
    You know, I'm sick of following my dreams, man. I'm just going to ask where they're going and hook up with 'em later

  4. #4
    Join Date
    Nov 2007
    Posts
    93
    create a button on a form ... and cal the duplicate query from the vba

    the duplicate query can be found in the query wizard

    like function test()
    docmd.openquery"xyz"
    beep
    end function

  5. #5
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    First off, what determines if there is an existing record? A single, identifying field? A combination of two or more fields? This may determine how simple or complicated the answer will be.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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