Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDI Forms w/ Code

Status
Not open for further replies.

TMoney216

Programmer
Mar 1, 2002
11
0
0
US
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?


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!!!!
 
Are you getting an error? If so what does it say. When you referred to your main form did you get intellisense response as you typed it? It looks like it should work... JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top