473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

can I do this some how?

ken
I'm in a form. I click a button to open a form. Within the onclick sub
there is code to open a form. I want that sub to wait until the user
completes his work on the newly opened form, then continue running the
sub. Does this make sense?

I tried with a while loop but that didn't work...

sub onclick_open_form

'open myform

'wait until the user is done with myform
do until not CurrentProject.Forms("myform").isloaded
loop
'once done loop terminates and we can go on here
'more code here...
end sub

Dec 28 '06 #1
4 1162
If you make the form "Modal", I believe the code halts until the modal
form is closed. Don't quote me on that, though.

You could always split the code and have part of it run when the form
opens and part of it run when the form closes, unless you need to carry
variable values. Even so, I think you can carry them using Global
variables.
ken wrote:
I'm in a form. I click a button to open a form. Within the onclick sub
there is code to open a form. I want that sub to wait until the user
completes his work on the newly opened form, then continue running the
sub. Does this make sense?

I tried with a while loop but that didn't work...

sub onclick_open_form

'open myform

'wait until the user is done with myform
do until not CurrentProject.Forms("myform").isloaded
loop
'once done loop terminates and we can go on here
'more code here...
end sub
Dec 28 '06 #2
ManningFan wrote:
If you make the form "Modal", I believe the code halts until the modal
form is closed. Don't quote me on that, though. [snip]
Close, but incorrect. If a form is opened with the acDialog argument of the
OpenForm method then it will behave as if both the Popup and Modal properties
are set to True AND it will cause the code that opened it to pause execution
until the form is closed or set to hidden.

Neither the Modal, Popup, or combination of both properties will cause code to
pause if the acDialog argument is not used.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Dec 28 '06 #3
ken
BRILLIANT!

Rick Brandt wrote:
ManningFan wrote:
If you make the form "Modal", I believe the code halts until the modal
form is closed. Don't quote me on that, though. [snip]

Close, but incorrect. If a form is opened with the acDialog argument of the
OpenForm method then it will behave as if both the Popup and Modal properties
are set to True AND it will cause the code that opened it to pause execution
until the form is closed or set to hidden.

Neither the Modal, Popup, or combination of both properties will cause code to
pause if the acDialog argument is not used.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Dec 28 '06 #4
Do you work for Guinness? ;o)

ken wrote:
BRILLIANT!
Dec 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: PHPkemon | last post by:
Hi there, A few weeks ago I made a post and got an answer which seemed very logical. Here's part of the post: PHPkemon wrote: > I think I've figured out how to do the main things like...
22
by: Martin MOKREJ© | last post by:
Hi, I'm looking for some easy way to do something like include in c or PHP. Imagine I would like to have: cat somefile.py a = 222 b = 111 c = 9
9
by: TPJ | last post by:
First I have to admit that my English isn't good enough. I'm still studying and sometimes I just can't express what I want to express. A few weeks ago I've written 'Python Builder' - a bash...
1
by: Az Tech | last post by:
Hi people, (Sorry for the somewhat long post). I request some of the people on this group who have good experience using object-orientation in the field, to please give some good ideas for...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
1
by: srikanth | last post by:
hi, I have one file it filled with some values in rows/colums. some times, some variables (in a particular row& column) may not be filled. depending on the kind its filled i will go for...
48
by: yezi | last post by:
Hi, all: I want to record some memory pointer returned from malloc, is possible the code like below? int memo_index; int i,j; char *tmp; for (i=0;i<10;i++){
24
by: Kevin | last post by:
Hey guys. I'm looking to get together some VB programmers on Yahoo messenger. I sit at a computer and program all day. I have about 3 or 4 people already, but it would be really cool to have a...
21
by: Jim | last post by:
I am trying to write an HTTP/HTTPS proxy server in VB.Net 2005. But, I don't really even know how the internal workings of a proxy should act. Does anyone have anything on the protocols used in...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.