Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    39

    Unanswered: run-time error 3011 is happening only on one workstation.

    I have a database that prints out property record cards and gives a user the ability to assign properties that need inspection to field staff employees. Its not a live database where users enter in new data and consists of only one table(Reval) which stores property record data.

    Field staff employees can search by subdivison to print property record cards for the whole subdivision that has been assigned to them. They choose thier name from a list box called "fsbx" that stores employee names and then enter the assinged subdivison in a text box called subdivisontxt so they can print those property record cards.

    This works great for all users except one workstation, this user searches for a subdivison and she encounters a run-time error 3011 and says it could not find the object '1'.

    I have no idea what this object 1 is, there isn't a macro, query, module with that name in the database.

    The event is triggered when you click the command button to to search for the subdivison the was entered in the text box, heres the code

    Private Sub Search_Click()
    If Me.fsbx > 0 Then
    DoCmd.OpenForm "FRMPropertyCardParcelSub", acViewNormal, acEdit
    Else
    MsgBox "You need to select an employee from the employee list above"

    End If
    End Sub

    "DoCmd.OpenForm "FRMPropertyCardParcelSub", acViewNormal, acEdit" is highlighted after clicking on Debug.


    fsbx is a list box which the employee must select thier name

    FRMPropertyCardParcelSub is where the property records cards are displayed so the user can go through the records/parcels before printing the report.

    Recordsource for FRMPropertyCardParcelSub is the below query

    SELECT [reval].field_person, [reval].subdivision
    From [Reval]
    WHERE ((([Reval].Field_Person)=[forms]![frmpropertycard]![fsbx]) AND (([Reval].Subdivision)=[forms]![frmpropertycard]![subdivisiontxt]));

    Any ideas as to why this is happening?

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Access when debugging code often highlights the line after the actual line causing the problem, which in this case would be the line

    If Me.fsbx > 0 Then

    As it happens, when first reading your post, even before getting to the part about which line was highlighted, this was where I thought the problem might exist. You write
    They choose thier name from a list box called "fsbx"
    which would lead one to assume that the Bound Column of the Listbox would hold a Text Value, names generally being made up of Text, rather than a Numeric Value. Yet in the line in question, you're comparing the Value with
    If Me.fsbx > 0 Then

    as though it were a Number!

    When validating whether or not a Listbox Control has had an item selected, you should be using something like

    If IsNull(Me.fsbx) Then

    The real question, in my mind, is not why your code doesn't work for this one user, but rather why it works for other users!

    What kind of Data is in the RowSource of the Listbox?

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jul 2009
    Posts
    39
    I just typed in the values I wanted which are field staff initials, we have five field staff employees

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Then

    If Me.fsbx > 0 Then


    should be

    If IsNull(Me.fsbx) Then

    I'd try that first.

    Also, when apps run fine on one machine and not on another, you need to think about are missing references on the errant PC.
    If you haven't checked References before, here are Doug Steele's detailed instructions on how to troubleshoot the problem:


    Access Reference Problems


    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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