Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65

    Red face Unanswered: run time error '94'

    Got a quick question. I got a simple data base to track parts and their part numbers. I created a combo box to quickly find the part number desired. This function works well but when I clear the box and click anywhere else I get this error:

    Run time error '94'
    Invalid use of null.

    The code:

    Private Sub Combo11_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[ID] = " & Str(Me![Combo11])
    Me.Bookmark = rs.Bookmark
    End Sub

    A little help is appreciated.
    Mike

  2. #2
    Join Date
    Feb 2004
    Posts
    199
    When you clear Combo , it is set to NULL, then your code "Combo11_AfterUpdate" runs where you try to call method FindFirst with criteria "[ID]=NULL"

    you shoud try to avoide running this code when cobmo is NULL

    IF NOT (ISNULL(Combo11)) then
    ....
    your code
    ...
    END IF

  3. #3
    Join Date
    Feb 2004
    Location
    Colorado state
    Posts
    65
    Thanks, will try when I get to work tomorrow.

Posting Permissions

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