By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

Capture tab control page name in control on subform

beacon
100+
P: 579
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)

Share this Question
Share on Google+
4 Replies


nico5038
Expert 2.5K+
P: 3,072
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

P: 8
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
100+
P: 579
@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
Expert 2.5K+
P: 3,072
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

Post your reply

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