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

Capture tab control page name in control on subform

beacon
579 512MB
Hi everybody,

[Access 2003]

I have a form (frmDeficiency) with a tab control (called deficiencyTabControl) that has 8 tabs. The first tab is for general information, but the 2nd through the 8th tabs have a subform on them.

Tabs names for 2-8 are Admit, 7 Day, 14 Day, 30 Day, 90 Day, Annual, and Discharge.

The subform on the second tab (Admit) is based on a query that shows all records and allows the user to add/update records related to a patient (the records are for mistakes made in a patient's chart, so some of the fields include the type of mistake, the date of the mistake, and the person that made the mistake). There's a CorrectedDate field that identifies when a mistake is corrected.

The subform on the remaining tabs (3-8) is based on a query that shows the same thing as the first query, but filters out those records that have been corrected.

The idea is that the user will enter the mistakes on the Admit tab when the patient is admitted and those mistakes that haven't been corrected by the time the user audits the patient's chart at 7 days will carry over from the Admit tab to the 7 day tab. This will continue until the patient discharges.

What I need now is some way to distinguish when the user entered the mistake, whether it was during the Admit, 7 day, 14 day, 30 day, 90 day, Annual, or Discharge audit. I thought about putting an unbound control in both of the subforms and passing the caption of the tab that is active when data entry takes place into the control, but I've been unable to do this.

So, my questions are, (1) how can I place the active tab control's caption in a text box on the subform, (2) how can I prevent the control from changing once a value is in it (I'm guessing that I'll check to see if the control is null before updating the control), and (3) will this work considering that the same query and subform is used for tabs 3-8?

I apologize for such a long post, but I appreciate any help I can get.
Jul 15 '10 #1

✓ answered by nico5038

Your splitting the periods into separate tabs (and subforms) does make managing this more complex.

What about one main subform with for each period a separate button besides that datasheet subform. (Admit, 7 day, 14 day, 30 day, 90 day, Annual or Discharge audit)
The button will trigger a filter on the subform and thus an extra column isn't needed and processing always uses the same subform.

Idea ?

Nic;o)

4 2433
nico5038
3,080 Expert 2GB
Hmm, wonder why you have this many correction possibilities in the first place.
I would create just one tab page with all records (your Admit tab) and add a column with the actual period like:
Admit, 7 day, 14 day, 30 day, 90 day, Annual or Discharge audit.
This column will allow the user to filter a period when needed.

The value of the .page property of the tab control will return the active tab/page.

Nic;o)
Jul 15 '10 #2
Good call nico. Then the user, when adding the mistake, just selects the current period from a combobox or something rather than a tab.
Jul 17 '10 #3
beacon
579 512MB
@nico5038
Hi Nico,

To answer your question, setting up the form like this mirrors a paper form that is being phased out. I was asked to set it up as close to the original form as possible, but have a little bit of leeway if the solution I come up with is user friendly.

That being said, are you suggesting that I add a column to the table that the subform is based on for the audit period? I had already planned to do this, but I was hoping to set it up so that the user wouldn't have to enter this information, that it would automatically do it based on the active tab.

It's likely that there will be a bunch of deficiencies per audit, so I was trying to break them out by their audit to make it easier for the person performing the audits to ensure that corrections were taken care of by clinicians.
Jul 19 '10 #4
nico5038
3,080 Expert 2GB
Your splitting the periods into separate tabs (and subforms) does make managing this more complex.

What about one main subform with for each period a separate button besides that datasheet subform. (Admit, 7 day, 14 day, 30 day, 90 day, Annual or Discharge audit)
The button will trigger a filter on the subform and thus an extra column isn't needed and processing always uses the same subform.

Idea ?

Nic;o)
Jul 20 '10 #5

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

Similar topics

1
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record...
8
by: A.M | last post by:
Hi, I know that i can use Page.Request.Path to find what is the current page name. The problem is I can't access to Page object inside a user control. Is there any way that a user control...
1
by: Bruce W.1 | last post by:
I've got a User Control which has a bunch of buttons for navigating. When clicked they do a Server.Transfer to another page in the application. How do I make the clicked nav button look...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
4
by: Ali | last post by:
I used to clear my page's control in Visual Studio 2003 using code like this: Dim c As Control For Each c In Page.Controls(1).Controls If TypeOf c Is TextBox Then CType(c, TextBox).Text = Nothing...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
1
by: jhcorey | last post by:
This is an ASP.NET 2.0 question. In 1.0, common techniques for communicating between a page and the controls on it depended on being able to declare variables of the page and control types....
3
by: dcassar | last post by:
I am working on a complex server control that dynamically creates an HtmlInputHidden control that stores its value. As far as the postback process is concerned, this hidden input acts as the...
1
by: Jordan S. | last post by:
I'm just wondering if this would work. Please note that I'm not asking *how* to raise events. I'm clear on that. What I'm not clear on is the sequence in which events are raised by custom controls...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.