Modal? acDialog?

Y

YYZ

Hi folks. I've inherited an Access project, and I'm a VB6 guy, so I'm
in territory that looks familiar, but isn't acting familiar. I need
to create a form with 2 fields on it (date and amount), and pass into
that form a recordset that I can use to AddNew or Update as
appropriate.

How do I instantiate a form? After that, how do I show that form
"modal" so that they have to deal with that input form before doing
anything else?

Any advice is very appreciated.

Matt
 
R

ruralguy via AccessMonster.com

Hi Matt,
Try: DoCmd.OpenForm "YourFormName", , , , , acDialog
 
A

Albert D. Kallal

We as a normal rule don't create an instance of a form.

To open a form, use

docmd.Openform "name of form"

however, when you open a form as model, it does NOT halt calling code. If
you open a form as acDialog, then it DOES halt calling code.

You should probalby slightly change how you "approach" these types of
problems.

however, I have a article that explains the difference between model and
dialog forms (unfortunately, the article leaves out popup forms).

You can find that article here:

http://www.members.shaw.ca/AlbertKallal/Dialog/Index.html

While the above article suggests using a dialog (not model) form, I actually
changed my mind, and do recommend that you AVOID dialog forms, as then
custom menus etc can't be used when you have a dialog open.

However, give the above article a read.

Note that you CAN create a instance of a form, but it can NOT be dialog (it
can be model however). I think the above should do the trick for you...
 
Top