Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

question of form modal property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jason Jiang - 28 Jun 2007 16:21 GMT
I want to open a form as modal. When I use this way, it suspend the calling
sub.

"docmd.openform formName,,,,,acDialog", Which is very good.

But when I want to open the form as class, The calling sub could be suspend.
Like this

dim Myform as new Form_ProductSelector
Myform.modal = true
Myform.show

The Form "ProductSelector"'s modal and popup property are set to "True" for
sure.
Anybody can tell me why?

Thank you very much!

Jason
Albert D. Kallal - 28 Jun 2007 17:19 GMT
> The Form "ProductSelector"'s modal and popup property are set to "True"
> for sure.
> Anybody can tell me why?

model and dialog settings are COMPLETE 100% unrelated to each other. We
talking apples and orange.

A model form is not a dialog form. Grand canyon of difference. That is
why....

I explain the difference here:

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

When you launch a model form via code, it NEVER did halt the call routines.
So, a model form is complete huge large diffent then that of a acDialog
form.

A dialog form is like a msgbox command, all focus remains on that dialog
(and you can't even use custom menus, or anything else). Were as model
forms...you can open more then one in succession in code...it does not halt
code. So, acdialg and model forms are HUGE MASSIVE LARGE different kinds of
forms.

A model form is used to control the flow of the users path. Thus, if you
have a customer form, and the open a invoice form, if you make them
model..the user will have to close the invoice form and traverse back the
same way they came. I would say that a fairly large portion of my forms are
model. Dialog forms also force this traversing back, but the purpose of
dialog forms is just that...it is a dialog like a msg dialog box and NOTHING
else can have the focus,a nd calling code halts. Hardly a modern user
interface in a windows environment in which users are supposed to have a
flexible UI.

You can't open a class instance of a form in dialog mode. Thus, if you need
to pass, or retrieve values from that form, a good approach is to simply set
a references back to the calling form, or better even to create a class
object in which to pass the values back.

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

Jason Jiang - 28 Jun 2007 18:06 GMT
Dear Albert

Again, thank you again. You help my out of this problem confused me for many
years -_-!!. I guess it's because the HELP in access is so blur. And you
also help me out for a good way to build a Form Function.

Thank you !!!a lot a lot!!!

With best regards

Jason

"Albert D. Kallal" <PleaseNOOOsPAMmkallal@msn.com> дÈëÏûÏ¢ÐÂÎÅ:%237hxWAauHHA.3476@TK2MSFTNGP02.phx.gbl...
>> The Form "ProductSelector"'s modal and popup property are set to "True"
>> for sure.
[quoted text clipped - 34 lines]
> simply set a references back to the calling form, or better even to create
> a class object in which to pass the values back.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.