none
Form will not open. Debug gives no indication why.

    Question

  • Access 2010. Last week, my form was working. Not sure what changed but now when I click the button that opens the form, nothing happens. The form does not display. The code for the form did not contain an Open or Load event so I added them each with a Msgbox display. Ran again, both messages display... then nothing. Form should display next but it does not. I compiled the database - no errors. In Design view if I right click and open form directly I get the two msgboxes than nothing else. Anyone got any idea what the problem could be or how to debug this?
    Tuesday, December 11, 2012 6:01 PM

Answers

  • After much investigating, it turns out the form was opening but was invisible as somehow it had shrank to a zero width and height. Anyone got any idea how this could have happened and how I can prevent it from ever happening again?
    Tuesday, December 11, 2012 6:51 PM

All replies

  • After much investigating, it turns out the form was opening but was invisible as somehow it had shrank to a zero width and height. Anyone got any idea how this could have happened and how I can prevent it from ever happening again?
    Tuesday, December 11, 2012 6:51 PM
  • After much investigating, it turns out the form was opening but was invisible as somehow it had shrank to a zero width and height. Anyone got any idea how this could have happened and how I can prevent it from ever happening again?

    Hi AllTheGood...,

    As far as I know on this moment this can occur, if somewhere in your code you use something like

            DoCmd.MoveSize <any value>,<any value>,0,0

    and it happens to be used on a form without System menu and without min-max-buttons.

    But until now I have never heard of such a phenomenon.

    Imb.

    Tuesday, December 11, 2012 10:49 PM
  • Do you have something in the AutoExec Macro to Open the Form Minimized?

    Chris Ward

    Tuesday, December 11, 2012 10:55 PM
  • After much investigating, it turns out the form was opening but was invisible as somehow it had shrank to a zero width and height. Anyone got any idea how this could have happened and how I can prevent it from ever happening again?

    Did you by any chance edit the code behind this form without first opening the form in design view?  That will cause the form to be opened in design view automatically, but I think I've seen it open the form to a weird size.

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Wednesday, December 12, 2012 5:25 AM
  • When I said it had shrunk to a zero width and height, I did not mean the form properties. They were still correct. I mean the form acted as though in design view I had dragged the borders to make the form zero width and height and then done a 'save'. Of course, I had not done that, but somehow Access took it upon itself to do it without my knowledge or permission.
    Wednesday, December 12, 2012 10:25 PM
  • It's possible but if I did that it was not intentional and I cannot confirm I did it or not.
    Wednesday, December 12, 2012 10:29 PM