Search results

  1. W

    Record-Level Validation

    Conditional formatting is a great idea. (Sure beats my asterisk on the labels beside the required fields.) But the Conditional Formatting dialog doesn't offer any condition related to nulls (and for text fields, testing for "" doesn't seem to work). How do you do it? (I have Access 2003.) Wayne
  2. W

    Record-Level Validation

    I was finally able to get this to work. Not exactly sure what's different now. But maybe there was a conflict with some table level validation I had mistakenly left in place. Just a couple more questions, if you don't mind: 1. You use the following code to test for a blank string: If...
  3. W

    Record-Level Validation

    Sorry. Here it is: Private Sub Form_BeforeUpdate(Cancel As Integer) Echo False If Len(Me.txtClaimNumber & vbNullString) = 0 Then MsgBox "Please enter the Claim Number." Cancel = True Me.txtClaimNumber.SetFocus End If Echo True End Sub
  4. W

    Record-Level Validation

    Thanks. That seems to do the trick. However, I also get other message boxes appearing in addition to the prompt to fill out the control. For example, after the msgbox I want, I see the following: The DoMenuItem action was canceled. When I saw this error, I tried wrapping the entire If...
  5. W

    Suspend Screen Painting During Form Updates

    If I add the code pieces you suggested, it fails to return to the bookmarked record on the parent form. If I then remove the Error-handling command, I see the following error: Run-time error '3159': Not a valid bookmark. So it appears that either the echo or painting command is deleting my...
  6. W

    Suspend Screen Painting During Form Updates

    This must be for a later version of Access. I get the following compile error: "Method or data member not found."
  7. W

    Record-Level Validation

    Can anyone offer guidance on how to do record-level validation of data input? For example, how can I validate one record field based on another field or fields on the same record? Currently, I'm using field validation at the table level, but I'd like to validate in the form in the above...
  8. W

    Suspend Screen Painting During Form Updates

    I have some VBA code that does a recalc on a grandparent form, then restores the record displayed in a parent form to a bookmarked record, as follows: Private Sub Form_AfterUpdate() Dim strBookMark As String strBookMark = Parent.Bookmark Me.Recalc Me.Parent.Parent.Recalc DoCmd.GoToRecord , ...
  9. W

    Table Field Validation Rules triggering in Forms

    Hello, Can you point me to any examples of how I might implement this type of form-level validation in a BeforeUpdate event of a form or control? Thanks. Wayne
Back
Top Bottom