473,851 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subforms in Tab Pages. Handling Startup actions for subforms

4 New Member
I have two forms:
1. Donor
2. Patron

I want to bring the two forms together in a tab control on separate pages.

I had some startup actions to be triggered for each form. Which event in the tab control page should I use for these?

The onLoad event was what I was using when these forms were independent. Now as subforms on the tab control, the OnLoad event is triggered when the main form is loaded. This creates a problem and new records in either form do not get saved. Which events should I use for triggering actions when these subforms get the focus?

Thank you in advance,
Sep 29 '09 #1
6 2729
1,287 Recognized Expert Top Contributor
The subforms have a Got Focus event. You may have to explain what you are trying to do a little more. Is the problem with startup actions (don't know what that means), or saving records, or something else?
Sep 29 '09 #2
32,584 Recognized Expert Moderator MVP
When you say SubForm, do you mean the control (which is a SubForm) or the form it contains (which isn't)?

Like Chip, I'm a bit confused as to what you actually want.
Sep 29 '09 #3
1,134 Recognized Expert Top Contributor
I think Sarvananda means where to put the code that used to be in the onload event of each subform now that they are in the tab pages of a tab control

Expand|Select|Wrap|Line Numbers
  1. Private Sub NameOfTabControl_Change()
  2.    MsgBox NameOfTabControl.Value
  3. End Sub

The above code will execute each time you change tabs on the tab control and
NameOfTabContro l.Value will tell you which tab is active. 0 for the first tab, 1 for the second, 2 for the third etc etc.

Use that to decide which modified version of your "OnLoad" code from your original forms to run

Does that help?
Sep 30 '09 #4
4 New Member
Thanks to ChipR, NeoPa, Delerna for your kind responses

We are back from a big restructuring of office network. We are not yet through but the Broadband is somewhat restored.

The two subfroms are actually data entry subforms.
When a tab is opened for the first time, the following should happen in the subform of the tab
1. Create New Record in the subform
2. Generated Unique ID
3. Lock Unique ID Control (Text Box)
4. Set focus on next control in data entry sequence

These should not recur on subsequent access to the tabs.
Data should be validated before being saved in either subform
Tab controls enable rechecking previously entered data before finally saving the records.

I needed advice on how to implement these.

Thanks in advance
Oct 6 '09 #5
32,584 Recognized Expert Moderator MVP
I expect this is a simple language issue, but before you ask for further assistance it would be nice if you replied directly to the questions posed to help clarify what you've already requested.

If, when asked clarification questions, you decide instead to start to explain again from scratch, then we may be here a long time.
Oct 6 '09 #6
4 New Member
Thanks for your advice NeoPa. I will try to follow it.
Oct 7 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Sandro | last post by:
hello ng i know, probably i am not the first asking about this, but i am really dependent on it. i have an asp.net application (aspx/jscript with c# codebehind) and i am searching for a possibility to invoke c# funtioncalls in the jscript-code. as i know there is a possible way by using XmlHttp, but isn't there any
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can be either single or continuous, I think I am still deciding what I want to lock down this entry...
by: misscrf | last post by:
I have an entry form which has a tab control. If print screens are needed, please let me know and I will prepare them and post them. Anyway, this tab control has 3 pages. When I am on one of the pages, it has 2 subforms. Now I do have onexit code for the last field of the 2nd form, which sets focus to the first field of the next form on the next page. Here is the thing. A user might be on the last subform on the last page. Then they...
by: Richard Stanton | last post by:
Hello all My database has a main form linked to table1. It has several subforms on the main form, all linked to table2. Table1 and Table2 are linked by primary/foreign key, no duplicates allowed, one-to-one. If I update field(s) on a single subform it works fine but when I update fields on multiple subforms ie without closing the form between updates, I get the following error:
by: robert.waters | last post by:
Hello, If I have a form containing a Tab Control with N pages, each page containing a subform, are those subforms loaded into memory when another page has the focus? I have tried iterating through the AllForms collection, but it only shows the parent form as being loaded. I have a project with a large number of single forms that I would like to group together under one or a few parent forms, using Tab Controls to accomplish this;...
by: jedraw | last post by:
I am trying to use the information provided in Allen Brownes response see Response. I have a mainform, a tabctl with 5 pages , 5 subforms and 1 subfrom control. I placed the subformname in the page tag for each of the pages. (That should load the proper subform when the tabctl is clicked). Now I'm trying to synchronize the subforms with the mainform and am having difficulty. The subform control is not bound. The mainform contains...
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase this is all very difficult to explain in words, please bear with me as I endevour to explain what it is I am trying to do. It would be helpful if I could attach a graphics file to this posting that would help explain what it is I'm trying to achieve...
by: Rich P | last post by:
Maybe you could try using a query as the recordsource for your subforms and for the criteria field in the query you could use a Form parameter. This way - instead of using the form filter property you could set a value in a textbox on your mainform which would filter the query. This way all of your subforms are synchronized. fieldname: fldx Criteria: Like Forms!Form1!Text0 Text0 would be a textbox on your main form (Form1 or...
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...
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...
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...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.