Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Aug 2005
    Thanked 0 Times in 0 Posts

    Invalid use of Null (Access 2000)

    On double clicking the control i get the error "Invalid use of Nul".I suppose this is because i use the IsNll as a condition in the statement, while at the same time my default number is 0.the default 0 always appear on the
    screen and i supose i have to change my condition.How could i get it ?
    Private Sub crates_DblClick(Cancel As Integer)
    If IsNull(Me!crates) Then
    MsgBox " you need to enter the crates! "
    Exit Sub
    End If
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Invalid use of Null (Access 2000)

    You can clear the Default property of crates in the design of the table.
    You can remove all 0 values by an update query:
    - Create a query based on the table.
    - Add the crates field.
    - Enter 0 in the Criteria line.
    - Select Query | Update Query.
    - Enter Null in the Update to line.
    - Select Query | Run.

    If you don't want to remove 0 values, change the condition in the code to

    If IsNull(Me!Crates) Or Me!Crates = 0 Then

Posting Permissions

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