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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In my MDIForm I've got this code be

Status
Not open for further replies.

tzamora

Programmer
Apr 15, 2002
27
US
In my MDIForm I've got this code below and it works fine...

public sub updbar()
sbStatusBar.Panels.Item(1).Text = "location (" & g_sys_location & ") Year (" & g_sys_Year & ") Season (" & g_sys_Season & ")"

From any MDIchild forms, how can I reference the same code so that the status bar on the MDIForm reflects the change?

Thanks
tz
 

From your child form you can reference the parent by...
[tt]
MDIParentFormName.sbStatusBar.Panels.Item(1).Text = "location (" & g_sys_location & ") Year (" & g_sys_Year & ") Season (" & g_sys_Season & ")"
[/tt]

Just as you would reference any control in another form.

Good Luck

 

MDIForm.updbar
[/b][/i][/u][sub]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
I tried this and I get an error...
Run-Time error '426':
Only one MDI form allowed.
...


MDIParentFormName.sbStatusBar.Panels.Item(1).Text = "location (" & g_sys_location & ") Year (" & g_sys_Year & ") Season (" & g_sys_Season & ")"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top