Results 1 to 9 of 9
  1. #1
    Robyn_P's Avatar
    Robyn_P is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    150

    Runtime error 2467 when going into design view anyway

    Hello all, I'm stumped. I have a form with a hidden textbox and in the form unload event I check whether this is null. When I close the form using the x button or through the [Close] command button I've created all works fine, when I right click and go into design mode, the isNull statement errors with a run-tim 2467 object does not exist. I have no idea why. Any suggestions? I can add error catching code to ignore the warning but I would rather know why it is being triggered in the first place.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I tried to replicate this issue and cannot. Post your code or provide db for analysis.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Robyn_P's Avatar
    Robyn_P is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    150
    I can't post the database, it's huge and the work system won't let me. The code that errors is [code]If Not IsNull(Me.txtHiddenID) Then[\code]

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I tried that and does not error. Is there more code?

    Use forward slash in CODE tag.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You will have to check for the state of the form

    https://docs.microsoft.com/en-us/off...rm.currentview

    you should only perform your code if the currentview is non zero (though I would limit it specifically to form view myself)

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    By any chance is there a subfom involved, or the form close button is disabled?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Robyn_P's Avatar
    Robyn_P is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    150
    The form close button is disabled and there is a subform. How could that be affecting it?

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Does your form contain a Web browser control.
    I find changing to design view can cause an error in that situation.
    If t helps, this is the error I have seen ...
    Attached Thumbnails Attached Thumbnails Capture.PNG  
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Quote Originally Posted by Robyn_P View Post
    The form close button is disabled and there is a subform. How could that be affecting it?
    The day I asked that question I had found a forum where it was indicated that this can happen under those conditions (or so I seem to recall). It's been too long now so I can't remember why or what the fix might have been. Sorry.
    Maybe you can find it if Colin's post doesn't help. I know that a subform opens before the main, so referring to a main field in subform load will cause issues. Don't recall if it also closes first. Maybe research that (or put a msgbox in both unload events so you can know which closed first) in case there's a connection between 2 forms that's causing it.

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

Similar Threads

  1. Error 2467 When Trying to Reach Report Controls
    By 123noob in forum Programming
    Replies: 5
    Last Post: 03-21-2019, 05:34 AM
  2. Replies: 2
    Last Post: 03-13-2015, 09:11 AM
  3. Replies: 8
    Last Post: 04-29-2013, 11:23 AM
  4. Error 2467
    By Ray67 in forum Forms
    Replies: 1
    Last Post: 01-26-2013, 11:41 PM
  5. Runtime 2467 only on a Win 7 Machine
    By ilikebirds in forum Forms
    Replies: 3
    Last Post: 12-11-2012, 03:58 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