Tab control question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello -

I have a table consisting of five items. That table is the main table to
which multiple relational tables are connected. I would like to use the tabs
in the tab control for each of these five items and have that tabbed 'Page'
of the control have access to multiple relational tables in that category.
(Did that make sense?) In other words, I was thinking along the lines of
using the tab control instead of a subform and then putting a couple of
subforms on each page. My problem is I have too many one-to-many
relationships and too many subforms are confusing to a user.

How do I go about doing that?

Any help will be greatly appreciated.
 
The thing to keep in mind is that all the pages of a tabcontrol are just
extensions of the form the tabcontrol is installed on. Your plan to put a
tabcontrol on a form and then add subforms to pages of the tabcontrol is a
good plan. Putting the subforms on pages of the tabcontrol will be
equivalent to putting subforms on the main form. You can put the LinkMaster
fields for the subforms either on the form you installed the tabcontrol on
or on any page of the tabcontrol. One is equivalent of the other.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
"PC Datasheet" <[email protected]> schreef in bericht
To the OP: Please beware of this guy PC DataSheet !!

Steve just does *not* care about the newsgroups. He has *no ethics at all*.
Steve *only* cares about making *money*, and he acts as if the groups are his private hunting ground.

-- He abuses this group and others for job-hunting and advertising over and over again
-- He is insulting lots of people here when they ask him to stop this
-- He posted as Steve, Ron, Tom, Rachel, Kathy, Kristine, Heather and ??? while asking questions
(the latest 'star's': 'Access Resource' and Tom (e-mail address removed) and Andy)
-- He tries to sell a CD ($125,--) with FREE code he gathered from these groups here
-- There even has been a 'Scam-alert' about him which has been explained recently in the thread 'To all':
http://groups.google.com/group/comp.databases.ms-access/msg/46038ba2954261f9?hl=en
-- Also recently it became clear that he has been spamming innocent people asking questions:
http://groups.google.com/group/comp.databases.ms-access/msg/4f76d0ed3e5f58ad?hl=en

So why would ANYBODY ever trust a person like him and hire him?
********************************************************

Explanation and more links on this answer:
http://home.tiscali.nl/arracom/stopsteve.html

Arno R
 
Thanks for your response!

I would like to dynamically populate the tabs with text (one word each -
there's only five items) from the table. Is this possible?
 
Sandy said:
I would like to dynamically populate the tabs with text (one word each -
there's only five items) from the table. Is this possible?

Assuming an .mdb with a reference to DAO:

Something similar to this example procedure would be created in the
form's code module and called from the form's OnLoad event.

Sub SetTabCaptions()
Dim rs As DAO.Recordset
Dim db As DAO.Database
Set db = CurrentDb
Dim i As Integer
With db
Set rs = .OpenRecordset("SELECT FieldName From YourTable")
Do While Not rs.EOF
Me.TabControl.Pages(i).Caption = rs.Fields(0)
i = i + 1
If i > (Me.TabControl.Pages.Count - 1) Then Exit Do
rs.MoveNext
Loop
rs.Close
Set rs = Nothing

End With
Set db = nothing
End Sub
 
Sandy,

If you have the tab names stored in a table, rkc's method is what to use. If
you generate the tab names in five textboxes, name the textboxes TabName1,
TabName2,.....TabName5 then use the following code in the appropriate event:
Dim I as Integer
For I = 1 To 5
Me.TabControl.Pages(I-1).Caption = Me("TabName" & I-1)
I = I + 1
Next I

Note: I-1 is used because page numbering on a tabcontrol begins with 0.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
"PC Datasheet" <[email protected]> schreef in bericht
To all: Sorry for this redundant post but it's a (semi-)automated reply .... ;-)
If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.


These 1000 (if at all a real figure..) is only the result of
-- 4 years abusing the newsgroups.
-- 4 years blatantly advertising and job hunting.

You only care about making money, and you act as if the groups are your private hunting ground.
So why would ANYBODY ever trust a person like you and hire you?
********************************************************
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

Need a psychiatrist ...Contact me!

Arno R
 
PC said:
For I = 1 To 5
Me.TabControl.Pages(I-1).Caption = Me("TabName" & I-1)
I = I + 1
Next I

You do know that you can start a for/next loop at zero, right?

for i = 0 to 4
'doo-ta-doo
next
 
More of your incredible programming skills. Your code will ony work for odd
values of I.

The For Next loop can start with 0, so there is no need for the "I-1".

Have you ever written a For loop in your life?
The Next statement automatically increments the index I by 1. You should
NEVER modify the index in a For loop with a statement line "I = I + 1" as
you did.

John... Visio MVP
 
Sandy,

Sorry, I made a mistake. You don't need the line I = I+1.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
PC Datasheet said:
Sandy,

Sorry, I made a mistake. You don't need the line I = I+1.

<snipped all the advertising>

So how do you DARE to advertise again here ?? Unbelievable !!

Arno R
 
Not a very sincere apology, two thirds of your message was your usual
solicitation.

John... Visio MVP

PS: You also have to learn how to trim.
 
Being the dimmest of the dimwits you have no concept of sincerity and
courtesy!!!

But of course they are both too big of words for you to comprehend.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
Wasting more band width with your caustic remarks?

John... Visio MVP

PC Datasheet said:
Being the dimmest of the dimwits you have no concept of sincerity and
courtesy!!!

But of course they are both too big of words for you to comprehend.

PC Datasheet

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee.
In other words, I'm not interested in helping you, I only want your money.
Over 1000 Access users have come to me for help.
How many have run away screaming?
Need a month calendar or 7 day calendar? No, I can get those for free.
Need appointment scheduling?
No, I'd prefer it from someone who understands how to code.
Need room reservations scheduling?
No, I can also get this one for free.
Need employee work scheduling?
No, I'm retired and enjoy helping other for FREE.
Contact me!
Do you really want me to?
 
"Caustic" ?? My, my did your mama tell you to use that big - ggg word? Of
course someone else had to spell it for the two of you. I wonder if either
of you know what it means, hmmm!

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
Sorry, I do not feel like engaging in your playground bullying. So if you
can not dispute the facts, you switch to juvenile insults. Definitely not
the sign of a professional whose services I would wish to engage. So if you
do plan on continuing with this tactic, I would suggest you remove your ads
since the slurs indicate a definite lack of professionalism. Also, these
newsgroups are archived and users will be able to see your rants for eons to
come.

You seem to forget that these newsgroups are sponsored by Microsoft and you
may get the notariaty of being one of the very, very few who Microsoft
decide to filter from the newsgroups. In general, Microsoft prefers that the
newsgroups are self moderated, so filtering would be a vey rare case and
since it is easy to chage your id, not a game Microsoft wants to play.

John... Visio MVP

PC Datasheet said:
"Caustic" ?? My, my did your mama tell you to use that big - ggg word? Of
course someone else had to spell it for the two of you. I wonder if either
of you know what it means, hmmm!

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee.
In other words, I'm not interested in helping you, I only want your money.
Over 1000 Access users have come to me for help.
How many have run away screaming?
Need a month calendar or 7 day calendar? No, I can get those for free.
Need appointment scheduling?
No, I'd prefer it from someone who understands how to code.
Need room reservations scheduling?
No, I can also get this one for free.
Need employee work scheduling?
No, I'm retired and enjoy helping other for FREE.Do you really want me to?
 
John Marshall said:
You seem to forget that these newsgroups are sponsored by Microsoft and you
may get the notariaty of being one of the very, very few who Microsoft
decide to filter from the newsgroups. In general, Microsoft prefers that the
newsgroups are self moderated, so filtering would be a vey rare case and
since it is easy to chage your id, not a game Microsoft wants to play.

John... Visio MVP

IMO it's about time that Steve is 'filtered' away by Microsoft.
Anyone of the MVP's or anyone else has a 'line' to MS??

MS can't filter you or me away, as *we* can easily change id. (But we don't need to ...)
For Steve it is more difficult to change his advertising-id !
Remember: Steve's name (PCDataSheet) is his weak point ! He *has* to advertise as 'PCDataSheet'.

Hmmm, he 'could' change his id to 'DataShit' but ...

Arno R
 
Back
Top