473,800 Members | 2,379 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,
Sarvananda
Sep 29 '09 #1
6 2724
ChipR
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
NeoPa
32,579 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
Delerna
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
  4.  
Sarvananda

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
Sarvananda
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
Sarvananda
Oct 6 '09 #5
NeoPa
32,579 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
Sarvananda
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

8
1732
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
7
6007
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
0
2703
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...
0
1465
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...
5
2640
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:
2
4566
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;...
5
3910
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...
4
6060
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...
4
5410
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...
0
10505
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...
1
10253
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
10033
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...
0
9085
agi2029
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...
1
7576
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
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
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
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.