I’m having *real* problems with forms, and I could do with some help. It should be soooo simple, but I just can’t get it to work properly.
The problem comes when I want to hide a form, do some stuff, and then reshow it – for example, in one particular case, I need to hide the form so that I can see the print preview of the spreadsheet I’ve just created, and then I want to continue on once the preview is closed. Unfortunately, I don’t seem to be able to unjide a form – I can only SHOW it. This then puts me back into the form at the entry level, rather than where I left off:
Let me try to be a bit more descriptive. I have a form which allows the user to set some options before creating a report (=spreadsheet). Set the options, click a go button. This checks the validity of the options, generates the report, and then previews it using Excel Print Preview. Now, if I don’t want the form obscuring all of the print preview (and, incidentally, grabbing focus so that I can’t close the preview, and therefore locking the program up), I hide the form using Me.Hide – I’m prohibited from setting the visible property directly, so this appears to be the only way.
So far so good, form goes away, print preview seen and closed, code continues to execute. At this point, I would like to display the form again so that I can carry on using the same options (for example, to have a report for a new date). Trouble is, the form starts again at the beginning, and being displayed modally, won’t finish running my tidy up code until you close it. I can’t display it modelessly, as the form is already displayed modally. HELP!
I think that each time I run a report I get another instance of the form (or the same one, but multiply re-entered), and this can’t be good. What am I doing wrong? Is there a better way?
PLEASE HELP!
Regards,