Results 1 to 9 of 9
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Object Variable Not Set (2000)

    Hi,

    I'm in the process of updating/revising a database I did about a year ago with some of the new code I've learned from the forum over the past weeks. I'm begining to think I'm nuts to even try!

    Anyway, I'm trying to open frmTimesheet to the name that is doubleclicked on frmEmployeeName. The form needs to open to a new record. I've used the follow code over and over in other instances with no problem. In this instance I'm getting an error message that states "Object variable or With Block Variable not set". I'm not sure what is missing.

    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Auto Number] = " & Str(Me![lstEmployeeName])
    Me.Bookmark = rs.Bookmark


    "Set rs = Me.Recordset.Clone" is the section highlighted when debugged.

    I've enclosed a stripped down copy.

    Thanks,
    Leesha
    Attached Files Attached Files

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

    Re: Object Variable Not Set (2000)

    Access crashes the moment I try to convert this Access 97 database to Access 2000. I could, however open it without converting.

    frmEmployeeName is an unbound form, i.e. its Record Source property is empty. So Recordset.Clone is not valid - there is no recordset.

  3. #3
    New Lounger
    Join Date
    Feb 2001
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Object Variable Not Set (2000)

    I opened this in ACCESS 97, and I'm not sure what it is you are attempting to accomplish. You are trying to send an Auto Number as the opening argument to another form with its own Auto Number field, which you can't do. You have dropdown boxes for most fields, including the Employees Name (with the Auto Number bound to the textbox already and is the same as the one you were attempting to pass). Seem like you already have the info available to you and the extra form isn't required.

    PaulF

  4. #4
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Object Variable Not Set (2000)

    <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    Thanks,
    Leesha

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Object Variable Not Set (2000)

    Hi Paul,

    This database is about a year old and I've come a long way since I first built it due to the help of the lounge. The DB itself works fine and the user is satisfied, however one of the data entry person's requests has always been to "NOT" have to enter in the employee name a gazillion times, as in with each entry on the the time sheet. It's not a biggie to them as once they type a few letters the employee name comes up, it was just a request. I do not want to make a major overhaul to the database tables as they already a year's worth of data in them etc. However, my hope was to be able to open frmTimesheet from frmEmployeeName so that frmTimeSheet opened to a new record with the employeeID already chosen. This would at least alleviate a few key strokes. Even after assigning frmEmployeeName to a control (I've tried tblTimesheet and tblEmploee) I'm not having any luck.

    Leesha

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Object Variable Not Set (2000)

    Post your latest DB Leesha.

  7. #7
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Object Variable Not Set (2000)

    Hey Bud!

    Just came in from mowing the lawn. Will be a bit before I can post it. I'm not sure its worth the work.

    Good to hear from ya,
    Leesha

  8. #8
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Object Variable Not Set (2000)

    Hi Pat,

    Here ya go. As per my normal format, I'd like frmTimesheet to open to the name doubleclicked on frmEmployeeName. I'm not even sure its possible without major table changes which I'm not really into doing. Let me know if you think it's a no go. I'll actually conceed defeat if you so.

    Leesha
    Attached Files Attached Files

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Object Variable Not Set (2000)

    I just tried to convert the A97 DB and I got an error message saying this database was created in an earlier version of Therapyworks? What on earth is Therapyworks?
    If your database is A2000 then email that to my profile email as a zipped file of course.

Posting Permissions

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