473,396 Members | 1,929 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,396 software developers and data experts.

Subforms in Tab Pages. Handling Startup actions for subforms

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 2701
ChipR
1,287 Expert 1GB
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,556 Expert Mod 16PB
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 Expert 1GB
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
NameOfTabControl.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
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,556 Expert Mod 16PB
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
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
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...
7
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
0
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...
0
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...
5
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...
2
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...
5
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...
4
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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,...

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.