Naming Tabs after Records

  • Thread starter Thread starter Nurse Matthew
  • Start date Start date
N

Nurse Matthew

I have a patient roster database, in a short-term hospital ward setting.

In the main data table, the patients [name] is stored.

I want to use a tabbed feature in Access that labels each tab as the
patients name. Each tab will display only information based on that
particular patient.

Whan a new patient is added, they get a tab automatically (when record is
added), and when someone is discharged, their tab is deleted automatically
(when record is deleted)

Can this be done?
NM
 
Nurse said:
I have a patient roster database, in a short-term hospital ward setting.

In the main data table, the patients [name] is stored.

I want to use a tabbed feature in Access that labels each tab as the
patients name. Each tab will display only information based on that
particular patient.

Whan a new patient is added, they get a tab automatically (when record is
added), and when someone is discharged, their tab is deleted automatically
(when record is deleted)


Well, it can by adding more pages than you will ever need
and using code vaguely like:

Dim k As Integer

With Me.RecordsetClone
.MoveFirst
Do Until .EOF
Me.TabCtl0.Pages(.AbsolutePosition).Caption =
!Patient
.MoveNext
Loop

For k = .RecordCount To Me.TabCtl0.Pages.Count - 1
Me.TabCtl0.Pages(k).Visible = False
Next k
End With

BUT, I think this make for a clumsy form design and a messy
user interface.

IMO, it would be much better to use a list box or a
continuous subform to select a patient and let the patient
subform sync up via the LinkMaster/Child properties.
 
If I understand correctly, you want a tab control to create a new tab when a
new patient record is created and then delete the tab when an existing
patient's status is changed to "discharged". Yikes! I don't know if this can
be done however why the complexity? Isn't it best simply to have a single
form with record navigation buttons...?
 
Thanks. I was just wondering if it would be beneficial, but it sounds clumsy
and bloated.
I like your idea better!
NM

Marshall Barton said:
Nurse said:
I have a patient roster database, in a short-term hospital ward setting.

In the main data table, the patients [name] is stored.

I want to use a tabbed feature in Access that labels each tab as the
patients name. Each tab will display only information based on that
particular patient.

Whan a new patient is added, they get a tab automatically (when record is
added), and when someone is discharged, their tab is deleted automatically
(when record is deleted)


Well, it can by adding more pages than you will ever need
and using code vaguely like:

Dim k As Integer

With Me.RecordsetClone
.MoveFirst
Do Until .EOF
Me.TabCtl0.Pages(.AbsolutePosition).Caption =
!Patient
.MoveNext
Loop

For k = .RecordCount To Me.TabCtl0.Pages.Count - 1
Me.TabCtl0.Pages(k).Visible = False
Next k
End With

BUT, I think this make for a clumsy form design and a messy
user interface.

IMO, it would be much better to use a list box or a
continuous subform to select a patient and let the patient
subform sync up via the LinkMaster/Child properties.
 
Back
Top