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 / March 2007

Tip: Looking for answers? Try searching our database.

Modal form passes sequence without waiting?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news2@rgcle.com - 28 Mar 2007 21:17 GMT
This MUST be simple.

I have a modal form that asks for entry of one field and has an OK button.

For the only field on the form I have a got-focus sub to load the field with
a default value.

The OK button has a sub to move the contents of the field to an external
public variable and then  docmd.close.

What happens is that when the form is opened with

DoCmd.OpenForm "<name of the form>", acNormal

the calling procedure continues to the succeeding statement without waiting
for the form's OK to be hit. The form remains visible.

Hints????

Dick
storrboy - 28 Mar 2007 21:22 GMT
On Mar 28, 4:17 pm, n...@rgcle.com wrote:
> This MUST be simple.
>
[quoted text clipped - 16 lines]
>
> Dick

Hint - acDialog.
Dirk Goldgar - 28 Mar 2007 21:39 GMT
> This MUST be simple.
>
[quoted text clipped - 17 lines]
>
> Dick

You need to open it explicitly in dialog mode:

   DoCmd.OpenForm "<name of the form>", WindowMode:=acDialog

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Albert D. Kallal - 28 Mar 2007 22:43 GMT
First, don't use a global var to pass, or retrieve values (a bad programming
practice).

To retrieve values from a form, and make the form halt, I explain how here:

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

Signature

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

news2@rgcle.com - 29 Mar 2007 01:37 GMT
Thanks, that did it. An earlier suggested solution worked but the compiler
complained.

Dick
 
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.