Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MDE Resume Next error (2002 (XP))

    I have created a database in 2000 format using Access 2003. Once control uses the On error Resume Next to cater for a blank field (Me.QPC), as follows:

    Private Sub Units_AfterUpdate()
    On Error Resume Next
    Me.CTNH = Me.Units * Me.CDH
    Me.CTNW = Me.Units * Me.CDW
    Me.CTND = Me.Units * Me.CDD
    Me.GrossCub = Me.CTND * Me.CTNH * Me.CTNW
    Me.ItemVolume = Me.CTND * Me.CTNH * Me.CTNW / Me.QPC
    End Sub

    In 2000 format the code works fine.
    When I update it to 2002/3 format the code works fine.
    When I create an MDE file the database crashes.
    Why is this and how can I fix it?

    Thanks in advance!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: MDE Resume Next error (2002 (XP))

    I don't know why this causes the database to crash, but since you use QPC only once, you could try

    If Not Me.QPC = 0 Then
    Me.ItemVolume = Me.CTND * Me.CTNH * Me.CTNW / Me.QPC
    End If

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MDE Resume Next error (2002 (XP))

    Thanks Hans, that solution worked.

Posting Permissions

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