Re: Passing Parameters Out of a DialogBox



Didn't say I knew for sure that's why I said "you will likely want". I
think setting the values from a dialog to the main routine only when someone
clicks "OK" (I.E., don't do it when you cancel) is pretty common and I just
wanted to show another illustration. To be fair, I don't know exactly what
they want.

Tom

"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:%23WbWS$CvGHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
// They canceled or closed without clicking OK so we don't want to get
the
new values.

How do you know what OP wants?

--
Ajay Kalra [MVP - VC++]
ajaykalra@xxxxxxxxx


"Tom Serface" <tserface@xxxxxxx> wrote in message
news:#FJl4Y8uGHA.3264@xxxxxxxxxxxxxxxxxxxxxxx
To add to what Ajay wrote, you will likely want to do something like:

dlg.m_nMyValue1 = m_nMyvalue1;
dlg.m_csMyValue = m_csMyvalue;

if(dlg.DoModal() == IDOK) {
// Get values
m_nMyValue = dlg.m_nMyValue1;
m_csMyvalue = dlg.m_csMyValue;
}

Tom


.



Relevant Pages

  • Re: help with loops
    ... How about having a function or subroutine that does the common stuff. ... Do the unique stuff for each group then call the common routine from ... place in the loop, so that the loop is physically smaller and more ... The user is confronted with a Input Box, an OK and Cancel option ...
    (microsoft.public.scripting.vbscript)
  • Re: run time error occured when " Cancel button is pressed from Open
    ... I am using this to display a Open dialog box. ... routine, which is required to handle the error occurred when user presses ... "Cancel" button of the dialog. ... I have set the CancelError member of common dialog is TRUE. ...
    (microsoft.public.vb.controls)
  • RE: After update
    ... your calling routine that there is a problem and not to open the next form. ... Setting the Cancel = True in the second routine will not achieve anything as ... > Exit Sub ... What opens the form you are concerned about, ...
    (microsoft.public.access.formscoding)
  • Re: Ammendment to KB 125648 Not-in-List routine
    ... AddNewGroup form (which should have an OK and Cancel button on it). ... AddNewGroup form should be bound to the table where the data will go. ... > Here is the routine... ... > Private Sub GroupNum_NotInList(NewData As String, Response As Integer) ...
    (microsoft.public.access.formscoding)
  • RE: Saving a file with date and time as filename
    ... routine should cancel the save. ... msgbox("Cannot Save file - Exiting Sub") ... filename as the defult path and filename. ...
    (microsoft.public.excel.programming)