473,790 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capture tab control page name in control on subform

beacon
579 Contributor
Hi everybody,

[Access 2003]

I have a form (frmDeficiency) with a tab control (called deficiencyTabCo ntrol) 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
4 2459
nico5038
3,080 Recognized Expert Specialist
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
esperance
8 New Member
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 Contributor
@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 Recognized Expert Specialist
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
3039
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 in the second subform , the code generates the message: Can't find the field »POG-03 Work Subform« reffrred to in your expression.
8
6906
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 access to the page class? Thanks Ali
1
1024
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 different? Let's say I simply want to change its background color. Would the code to implement this be in the User Control's code-behind, or in the code-behind of the page that's using the User Control? From where does one access and control the User...
2
3631
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
4429
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 End If If TypeOf c Is DropDownList Then CType(c, DropDownList).SelectedIndex = 0 End If Next
5
3597
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 that for server control component , code is running on the server side. But if I take as example a Label. I place on a webform an HTM label control and a WebForm label control, I could see that properties are different for
1
1203
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. For example, if I had a page called MyPage.aspx, then I could declare a variable of type MyPage in my user control code. Typically I would have a namespace with the same name as my project.
3
2132
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 control itself. So when I render, I generate a proxy HtmlInputHidden like so: protected virtual void Render(HtmlTextWriter writer) { HtmlInputHidden hiddenInput = new HtmlInputHidden(); hiddenInput.ID = ClientID; hiddenInput.Name = UniqueID;
1
2091
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 relative to the hosting Page, and therefore if the following specific arrangement would even work. What I'm looking to do is dynamically insert multiple custom composite Web server controls onto a blank Page. This is no problem, I know how to do...
4
2493
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 unsuccessfully in creating the whole pane as a user control and have succeeded in adding the pane and then dynamically adding the content which is a user control to the pane, dynamically within the page. However I would like to have a single pane...
0
9666
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
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9987
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
9023
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
7531
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
5424
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...
1
4100
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
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2910
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.