Hi again. I have one form (form1) opening another form (form2) as a dialog box. The user may enter some data into form2, then will press either cmdOK or cmdCancel to finish.
I want form1 to be able to know which button the user pressed in form2. I tried it like this;
VB Code:
{form1} load form2 form2.show {form2} Private Sub cmdCancel_Click() Me.Visible = False End Sub {form1 again} if form2.cmdCancel.value then (disregard the operation because they pressed the cancel cmd button) endif
In the form2 cmd_click sub, the cmdCancel property is TRUE after they press Cancel. But as I step thru the program, I notice that when it returns to form1, the cmdCancel value is set to FALSE.
Any ideas how form1 can read the values of the form2 command buttons?
Thanks again - Tom




Reply With Quote