Open a form acDialog and filter shortcut menu doesn't work

  • Thread starter JABCCS via AccessMonster.com
  • Start date
J

JABCCS via AccessMonster.com

Hi all,

I have a form that I open in VBA with this command:

DoCmd.OpenForm "frmProjectBudgets", acNormal, , , , acDialog

The right-click shortcut menu is available but all the Filter options are
grayed out. In the form definition Allow Filters is set to "Yes".

If I remove the acDialog at open, the filter options are available.

I want the filter options to be available all the time but acDialog is
causing a problem. Anyone know why this is happening and what the fix is?

Thanks

john
 
J

JABCCS via AccessMonster.com

Thanks Albert. That was a good read.

I'm in a bit of a catch 22 with this one. I'm using acDialog because I want
to stop the VB code at the point I open the form. When the form is closed I
want to continue running the code. acDialog accomplishes this. However,
with acDialog I don't have the filtering options available on the right-click
shortcut menu. If I use a Model form, I have the filtering options available
but it doesn't stop the vb code from running after the form is opened.

I've tried using a Model form and, in the vb code, testing to see if the form
is open before continuing the vb code. That works until I actually use the
filtering function on the shortcut menu and then the vb code continues as if
I closed the form. I don't know why that happens.

john
 
A

Albert D. Kallal

I've tried using a Model form and, in the vb code, testing to see if the
form
is open before continuing the vb code.

Once the form has finished opening, the calling code will continue. It does
not wait, and this is normal.

Your solution is to move the code *after* the open form to a separate
sub/function, and have the model form call that code on the close event.....
 
J

JABCCS via AccessMonster.com

You know Albert...that seems so obvious now that I see it in print. Thanks a
lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top