Results 1 to 2 of 2
  1. #1
    sruch is offline Novice
    Windows Vista Access 2007
    Join Date
    Apr 2011
    Posts
    1

    me.dirty causes "can't find the object" error

    Using Access 2007. I'm starting with a new record on a form. I just want to save the record when someone types something in the ProjNum field and then focus is lost.

    I have tried putting this in a module linked from the afterupdate event of the Projnum field:


    Private Sub ProjNum_AfterUpdate()
    If Me.Dirty Then Me.Dirty = False
    End Sub
    But I get an error when I run it: "Microsoft Access can't find the object". It doesn't seem to like using "Me". But I have also tried ProjNum.Dirty and that doesn't work either.

    Any ideas?

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    if you've got that in an independent MODULE, of course it's going to error! put it behind the form's module.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  2. "Can't find field"error msg
    By gg80 in forum Reports
    Replies: 4
    Last Post: 01-17-2011, 12:46 AM
  3. runtime error "Object Not Set"
    By specauto in forum Access
    Replies: 1
    Last Post: 08-22-2010, 12:12 PM
  4. Error message and How do I find the "value Field" ?
    By createdwithfire in forum Forms
    Replies: 1
    Last Post: 11-05-2009, 12:26 PM
  5. "doCmd - can't find object"
    By drmcfall in forum Access
    Replies: 1
    Last Post: 08-18-2009, 09:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums