Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jan 2002
    Location
    Oregon
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error 'rememembered' by code after repair (2002)

    I had a misspelled variable name in a short section of code which I found by steping through the code and watching the Locals window. I fixed the error, saved the code and the problem dissapeared. This morning when I restarted the computer the problem reappeared. Checking the code, the errors is still fixed but the locals window claims that the original mispelled variable is still present. The code is shown below as well as a copy of the data in the locals window. I have marked the location of the original error.

    Has anyone seen this before? Any suggestions as to the solution?

    --------------------- The following code is intended to open a form to enter publisher data with the record set to the end of the table for a new publisher ----
    Private Sub PublisherID_DblClick(Cancel As Integer)

    On Error GoTo Err_PublisherID_DblClick
    Dim lngPublisherID As Long

    If IsNull(Me![PublisherID]) Then
    Me![PublisherID].Text = ""
    Else
    lngPublisherID = Me![PublisherID]
    Me![PublisherID] = Null
    End If
    DoCmd.OpenForm "frmPublishers", , , , , acDialog, "GotoNew"
    Me![PublisherID].Requery
    If lngPublisherID <> 0 Then Me![PublisherID] = lngPublisherID
    ^ NOTE lngPublisherID was spelled lngPublisherrID before correction here ****************
    Exit_PublisherID_DblClick:
    Exit Sub

    Err_PublisherID_DblClick:
    MsgBox Err.Description
    Resume Exit_PublisherID_DblClick
    End Sub

    contents of locals box:
    + : Me : : Form_BookPublisher subform/Form_BookPublisher subform
    : Cancel : 0 : Integer
    : lngPublisherID : 0 : Long
    : lngPublisherrID : Empty : Variant/Empty

  2. #2
    Lounger
    Join Date
    Jan 2002
    Location
    Oregon
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: error 'rememembered' by code after repair (2002)

    Problem solved by removing code entirely and closing database - restarted and put in code again - problem and extra variable are now gone.

    Bob

Posting Permissions

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