By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,652 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,652 IT Pros & Developers. It's quick & easy.

Bypassing a dialog

P: n/a
Hi,

I'm trying to have an Access 2002 dialog form hide itself automatically
before being displayed under certain conditions. But setting Me.Visible
= False in the Open event has no effect. It's False anyway at that
point, and gets set to True again when Open completes, and the dialog
is displayed.

Any suggestions?

Jerry

Jan 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jerry Porter wrote:
Hi,

I'm trying to have an Access 2002 dialog form hide itself automatically
before being displayed under certain conditions. But setting Me.Visible
= False in the Open event has no effect. It's False anyway at that
point, and gets set to True again when Open completes, and the dialog
is displayed.

Any suggestions?

Jerry

Why not check if it should be hidden or visible prior to opening?
Dim intHide As Integer
Dim blnHide As Boolean
blnHide = (1<>2)
intHide = IIF(blnHide,acHidden,acWindowNormal)
DoCmd.OpenForm "Test", , , , , intHide

Jan 11 '06 #2

P: n/a
I had tried that yesterday, but since I couldn't remember why it didn't
work, I tried again, and I think I got it working <g>.

There are two issues:
1. The dialog has to run some processes before the main form can select
data.
2. I keep the dialog open, so the user can redisplay it and modify
selection settings.

I handled #1 in bypass/hidden mode by running the dialog's processes
from the main form after opening it hidden. This way, they complete
before the main form code continues.

For #2, if the dialog is opened as hidden, it can't be opened as a
dialog any more. So I close it after the processes are run, when it's
open in bypass/hidden mode. (Since the user never got a chance to
change the settings, that's OK).

It's not as clean as I'd like, but it seems to be working.

Thanks,

Jerry

Jan 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.