Hi All,
Fairly new to VB, and I have, what is probably an easy one, a question.
How can I access controls on the main MDI form from a child or document form? When I run the code below I get a runtime error of "Only One MDI Form Allowed", it seems its treating it as another declaration of the form class frmMain.
This occurs when I try to update the main MDIForms status bar, from the Add button on my child form...
Private Sub cmdAdd_Click()
On Error GoTo AddErr
frmMain.sbStatusBar.Panels(2).Text = " Adding an Employee...."
adoPrimaryRS.MoveLast
adoPrimaryRS.AddNew
grdDataGrid.SetFocus
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Thanks!!!!
Fairly new to VB, and I have, what is probably an easy one, a question.
How can I access controls on the main MDI form from a child or document form? When I run the code below I get a runtime error of "Only One MDI Form Allowed", it seems its treating it as another declaration of the form class frmMain.
This occurs when I try to update the main MDIForms status bar, from the Add button on my child form...
Private Sub cmdAdd_Click()
On Error GoTo AddErr
frmMain.sbStatusBar.Panels(2).Text = " Adding an Employee...."
adoPrimaryRS.MoveLast
adoPrimaryRS.AddNew
grdDataGrid.SetFocus
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Thanks!!!!