[AccessD] In a legacy system how control a Vba MsgBox

Max Wanadoo max.wanadoo at gmail.com
Thu Jan 28 14:08:05 CST 2010


Ed,
Many ways to solve this. Here is one that I frequently use.  Very much
abbreviated.

1.open form as modal from code. (acDialog)
2. On the  form if the user clicks YES, make the form invisible. At  which
point the process will return to the code line following that which opened
the form.
3. On the form if the user clicks NO close the form.
4. In the code check to see if the form is still open. 
5. If it is process the YES code, else process the NO  code.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Edward Zuris
Sent: 28 January 2010 19:40
To: accessd at databaseadvisors.com
Subject: [AccessD] In a legacy system how control a Vba MsgBox

 
 Dear AccessD Forum
 
 I am doing a little automation work within a legacy
 environment.
 
 From inside some VBA code, a form is opened, given some
 data, where buttons and controls are clicked.
 
 The opened form, ft001CreateTasks, has a MsgBox asking
 a Yes/No question.
 
 What kind of handle do I use to click the YES button
 on the message box modal form ?
 
 Or are there some other way of tackling this issue ?
 
 Thanks.
 
 Sincerely,
 Ed Zuris.
 

    ====================================================
                 Example Vba Code snippet
    ====================================================
 
    strVar = ""
    DoCmd.OpenForm "ft001CreateTasks", , , strVar
 
    strVar = "Rake Yard"
 
    Forms("ft001CreateTasks").cboTaskType.Value = strVar
 
    Call Forms("ft001CreateTasks").cboTaskType_Click
 
    . . . . now a message box open on the form . . . . .
 

    ====================================================
    ====================================================
 
 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list