473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Subform in MainMenu Form

Hi,

This is what I'm trying to do:

- I have a Main Menu, on the left side are the menu items. When I
click on the menu item, I want the form to open in the area to the
right.

Currently what I'm doing is double work by creating the menu items on
each form, so if I create a new subform, I have to add a button on
every new form so it looks flawless.

I would like to just have the subform open in the area to the right
using one form with only one set of menu item buttons.

The only thing I can think of is possibly make a subform for my menus,
not sure if that is the route to take or not, haven't thought it all
the way through.

Thanks,
Donnie
Mar 20 '08 #1
3 1441
So, I would try to call each subform that I need?

Would I have to add multiple subforms, one on top of the other.

I know I've used a tab feature before and had the menu call the tab,
and I made the tabs hidden. But I seen someone elses database and I
don't think they did that.

Can you break it down a little for me?

Something like this:

Menu Item1 - The event on click should be

And the subform, should have the datasource what you mentioned ealier.

Thanks for your help.

Donnie
Mar 21 '08 #2
Think I'm close.

I entered the code for the after update below.

Private Sub MyOptionGroup_AfterUpdate()

Select Case Me!MyOptionGroup

Case 1
Me!MySubformControl.Form.SourceObject = "sbfPersonnelUpdates"
Case 2
Me!MySubformControl.Form.SourceObject = "sbfPersonnelUpdatesTest"
Case 3
Me!MySubformControl.Form.SourceObject = "sbfDutyStatus"

End Select
End Sub

I'm getting this error:
Runtime Error: 2467, The expression you entered refers to an object
that is closed or doesn't exist.

I know all of the subforms are there, I named the sbf control as
required, not sure what else it could be.

Thanks
Mar 27 '08 #3
Figure it out:

I simply needed to create the subform control and add this to a
command button.

Me.MySubformControl.SourceObject = "sbfPersonnelUpdates"

Me.MySubformControl This is the name of the subform control
"sbfPersonnelUpdates" This is the name of the form I'm calling.

This causes the form to open in the subform control.
Mar 28 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anand Ganesh | last post by:
Hi All, I am trying to create a control - .dll file. In the toolbox the MainMenu tool is disabled. What should I do to invoke it? Why is it disbaled?
6
by: Jason Huang | last post by:
Hi, In VB, we have windows control item "MainMenu", do we have this item in the ASP.Net C# web form? Or how could we make it? By the way, how about the ASP.Net 2005? Thanks for help. Jason
2
by: Marty | last post by:
Hi, I have this issue where a form that contain a System.windows.forms.mainmenu has its height increased by the height of the mainmenu at object creation level. Here's the idea: //form...
1
by: Wayne | last post by:
I have a MDI Container, it has its own MainMenu. When I instance a Form that I have created a MainMenu for, instead of staying with the instance of the form, it will appear on the MDI Container...
1
by: PogoWolf | last post by:
Hey all, I have a MDI interface going on, with a MainMenu object in the Container Form. The FIRST screen that pops MDI is the 'Login' form. the problem is, the MainMenu is apart of the...
2
by: polocar | last post by:
Hi, I'm writing a program using Visual C# 2005 Professional Edition, and I was trying to assign multiple MainMenu objects (one by one, of course) to the same Form (let's suppose 2 MainMenu...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
1
by: Benson | last post by:
I have a MainMenu (MenuStrip) which will be loaded (dynamic by codes) after the program Login form. The first time run is ok. But when I close the MainMenu and go back to Login form, and then go to...
2
by: Academia | last post by:
In an old project I still use MainMenu and ContexMenu. How can I get them to appear in my Toolbox? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.