473,670 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open a subform

In a main form, I want to open a subform at one condition and open a
different subform at another condition, How to it? I'm using MS-access
2000.
Your help is highly appreciated.

Rich
Nov 13 '05 #1
3 5659
Rich wrote:
In a main form, I want to open a subform at one condition and open a
different subform at another condition, How to it? I'm using MS-access
2000.
Your help is highly appreciated.

Rich


Change the Source Object

Me![subMySubform].SourceObject = "frmMyForm"
--
regards,

Bradley

Nov 13 '05 #2
Rich,

Depending on the complexity and the frequency of the sub-form changing, you
could change the visibility property of the subforms using the On Current
event for the form if you want it to change when you change records and for
the On Change event for the control that determines which subform should be
shown.

--
Jeremy Shapiro
Asandia, Corp.
www.asandia.com
1.866.ASANDIA (272.6342)

"Rich" <li*****@yahoo. com> wrote in message
news:1c******** *************** ***@posting.goo gle.com...
In a main form, I want to open a subform at one condition and open a
different subform at another condition, How to it? I'm using MS-access
2000.
Your help is highly appreciated.

Rich

Nov 13 '05 #3
"Bradley" <br*****@REMOVE THIScomcen.com. au> wrote in message news:<40******* ***@news.melbou rne.pipenetwork s.com>...
Rich wrote:
In a main form, I want to open a subform at one condition and open a
different subform at another condition, How to it? I'm using MS-access
2000.
Your help is highly appreciated.

Rich


Change the Source Object

Me![subMySubform].SourceObject = "frmMyForm"


It works!
Thank you very much.

Rich
Nov 13 '05 #4

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

Similar topics

1
10690
by: John | last post by:
(acc2002) I have a command button (cmdView) on a form (frmOverview)that needs to open a form (frmFilmProjectAgreements) and its two subforms (control names: fsubAgreements and fsubPayments) based on parameters on the original form (frmOverview). The problem is navigating the subforms to specific records. Here's my code (frmOverview.cmdView_Click)thus far:
25
10222
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
5
3367
by: Bob | last post by:
Hi Everybody I have a form called frmListBox that is connected to a table tblListBox. This is opened from a form called "frmInvoiceOrder" which has a subform called "zfrmInvoiceOrder" and floats above (ie is pop-up) ! Private Sub ListBox_DblClick(Cancel As Integer) DoCmd.OpenForm "Forms!!!.Form! = Me!ListBox.Column(1) Forms!!.Form! = Me!ListBox.Column(2)
1
2175
by: Annette Massie | last post by:
I have a form (frmMainForm) that has a tab control (frmTab). This tab control has 4 pages. Each page has a subform on it. I am in the first tab's subform and in a listbox. I want to double click an item in the list box and have it go to that record that is on the 3rd tab's subform. The third tab is called Equipment Tab and the form is called frmEquipment. I can't figure out how to open frmEquipment, passing the criteria from the first...
6
5967
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 forms in the database that will use this function, so I need to be able to tell the code which form to unlock. What I have is as follows: Public Function akeyEdit()
2
2437
by: billypit | last post by:
Hi, I have one form in which I have one combobox and one subform. now when I am selecting value from combobox it will show details in subform by filtering from table based on my selection of value of combobox . But it always show the subform in datsheet view. But I want it as form view always. So how is this possible? Thank You
1
3242
by: veteranwebdesign | last post by:
Hello, I have a main form. I want forms to open in a subform control box. What is the code for the option group to open the subforms in the control box. I didn't create subforms, I created regular forms, but will create subforms if that is needed for this to work. My main goal is when a user clicks on a menu item and comes to a main
5
4897
by: samdev | last post by:
I have created two combo boxes in a subform.... For example 1. Combo Box State 2. Combo Box City 3. When a state from the Combo Box State is selected, the City combo box updates to reflect the State chosen by only showing cities in that selected state. 4. When I open just the subform it works just fine but when I open the
0
30376
by: Gordon Padwick | last post by:
A form contains controls, one or more of which can be other forms. A form that contains another form is known as a main form. A form contained by a main form is known as a subform. A subform itself can contain other forms, sometimes known as subsubforms. This article deals only with main forms and their immediate subforms. The books about Access I’ve read contain some useful information about subforms, but don’t adequately cover the matter of...
1
1607
by: neelsfer | last post by:
When i use this code to count the number of records on display in a specific subform in the "txtRecordNo" field that is open now, it seems to "update" all the time as the cursor changes every second and i am unable to add new records on mainform, untill i click in one of the fields of this Subform. Then it settles down. Otherwise it works 100% when i add records in the subform. pls help Private Sub Form_Current() Dim rst As...
0
8471
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8903
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8815
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6216
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5686
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4213
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4393
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.