Problems with field validation as part of a BeforeUpdate function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m115435
    New Member
    • Mar 2010
    • 1

    Problems with field validation as part of a BeforeUpdate function

    We are using an Access database developed by an outside vendor in 2001-2003.

    When entering data, the user would click OK on the form and a BeforeUpdate module would run to make sure entries had been made in various fields. If an entry was missing, a message box would appear stating the need to enter data, the user would click OK on the message box and the cursor would be placed on the field of interest.Once all necessary data were entered, the user would click OK, the record would be saved and the form closed.

    We have discovered that this process is no longer functional. (This may date back to our transition to Access 2003?) If there are empty fields and the user clicks OK, the message box appears but when the user clicks OK on the message box, the form closes and the record is not saved.

    Could this be a compatibility issue between Access 2000 and Access 2003? Something to do with having the field validation as part of a Form BeforeUpdate function with the OK_Click function in the Form code?

    Examples of the field validation code, similar code that sort of works as an AfterUpdate function and the OK_Click code are attached. Any help would be greatly appreciated!
    Attached Files
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    Place a breakpoint on/in the sub and walk through with F8 to understand what is going on and where it may be failing...



    Good Luck

    Comment

    Working...