If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I open form and wait from VB Script
While executing a VB script in Access 2003 I would like to "pop up a dialog
to get some user input" and then proceed with the script. As far as I can figure out, VB Access does not support dialogs as such but rather I build a Form that contains the various UI elements that I would like to use to get the user's input. How do I display the form and wait for the user to click Ok/Cancel on the form? The DoCmd.OpenForm returns immediately. Do I have to build a "sleep" function that periodically wakes up to see if the form has set a global variable "I Have been closed?". What I'm trying to do is a build a glorified MsgBox to get more than just Yes/No/Cancel from the user. Daniel |
#2
|
|||
|
|||
How do I open form and wait from VB Script
If you just need the code to wait, then use input box
strAnswer = inputbox("please enter your name") if strAnswer "" then msgbox "Your name is " & strAnswer end if The above code does wait. If you want/need to ask MORE then one thing, then you can use a form you build as a dialog form. I explain how he http://www.members.shaw.ca/AlbertKal...log/Index.html -- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada |
#3
|
|||
|
|||
How do I open form and wait from VB Script
Thanks. EXTREMELY helpful and right on point.
Daniel |
#4
|
|||
|
|||
How do I open form and wait from VB Script
Just so the record is straight, a WindowMode of acDialog will stop code
execution in the calling form until the form is closed or made invisible. This is all covered in the VBA help on OpenForm. foobar wrote: Thanks. EXTREMELY helpful and right on point. Daniel -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200608/1 |
Thread Tools | |
Display Modes | |
|
|