Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2009
    Up Nort' Wi

    Unanswered: Text box error trapping

    Ok, may seem like a stupid question but here goes anyways:

    I've a date range search form using three text boxes (single date or start/end dates), all using the short date input mask. I've got the form set as far as custom messages on form_error and format checks.

    My question is, is there some way to get Access to tell me which text box throws an input mask error so I can set it to clear only that text box? Am I stuck clearing all three, or is there some method I can use to get in front of the error before it calls Form_Error to find out which box it is?
    (I have to clear the error'd box, I can just see some of these users happily clicking away for hours trying make the app tired so it'll eventually let 'em do what they want like they're five years old asking mommy for candy)

    Thanks much,

    Good, fast, cheap...Pick 2.

  2. #2
    Join Date
    Dec 2004
    Madison, WI
    Not sure I quite understand but I often throw in a msgbox "I'm here in code..." in places where I want to test if it's reached that function.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    Dunno... I dodge input masks like the plague ^^

    I wouldn't have thought input mask violations could be trapped with code at all

    What I do is remove the input masks and check the fields with code BeforeUpdate'ing the form..
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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