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

Tab control - Changing Page

553 512MB
I have a Tab control on my form.

Can anyone guide me how to wirte a little code to switch from one page to another.

We can easily click on Page 1, Page, and so on but i need to create a button on each page to move to the next page.

Can anyone help

Thanks
Jul 7 '07 #1
11 6214
Robbie
180 100+
I have a Tab control on my form.

Can anyone guide me how to wirte a little code to switch from one page to another.

We can easily click on Page 1, Page, and so on but i need to create a button on each page to move to the next page.

Can anyone help

Thanks
Just played around and that found this works for the TabStrip control:
Expand|Select|Wrap|Line Numbers
  1. Dim WantedIndex As Integer
  2.     WantedIndex = TabStrip.SelectedItem.Index
  3. 'Add 1 or subtract 1 from WantedIndex to go forward or behind by one...
  4.     TabStrip.Tabs(WantedIndex).Selected=True
  5.  
You'll then need to call the event which deals with stuff when a user clicks on a tab, because otherwise only the selected tab will change but the visible objects won't.
Jul 7 '07 #2
questionit
553 512MB
Hi

Thanks

But my compiler gives me error on these:

SelectedItem
Tabs
These methods dont seems to be available in my version of VB.

Any idea why i get "no Sub or Function not defind" error ?


Just played around and that found this works for the TabStrip control:
Expand|Select|Wrap|Line Numbers
  1. Dim WantedIndex As Integer
  2.     WantedIndex = TabStrip.SelectedItem.Index
  3. 'Add 1 or subtract 1 from WantedIndex to go forward or behind by one...
  4.     TabStrip.Tabs(WantedIndex).Selected=True
  5.  
You'll then need to call the event which deals with stuff when a user clicks on a tab, because otherwise only the selected tab will change but the visible objects won't.
Jul 7 '07 #3
Robbie
180 100+
Hi

Thanks

But my compiler gives me error on these:

SelectedItem
Tabs
These methods dont seems to be available in my version of VB.

Any idea why i get "no Sub or Function not defind" error ?
It says sub/function not defined because of Tabs(WantedIndex). It thinks I'm talking about a sub or a function, which we haven't yet made. I'm actually talking about the array Tabs() which should be part of the TabStrip, but it seems that array doesn't exist either, so...

- What version of VB are you using?
and
- When you click on the tabs object, in the form designer, in ther properties box, does it say "OptionsTab TabStrip"?
(Replacing OptionsTab with whatever you named it)
Or does it not say TabStrip?

Because, I'm using the TabStrip control in VB6.

If it says SSTab, that's the Microsoft Tabbed Dialog Control. That is much easier to set the selected tab of:

Expand|Select|Wrap|Line Numbers
  1. YourTabObject.tab = YourObject.tab + 1
  2. '(or -1 to go back by one tab)
  3.  
Jul 7 '07 #4
questionit
553 512MB
I have VB 6.3

There is nothing called TabStrip at all.
Here, VB calls is Tab Control instead

and there is nothing like SSTab

Could you figure out the problem now?


It says sub/function not defined because of Tabs(WantedIndex). It thinks I'm talking about a sub or a function, which we haven't yet made. I'm actually talking about the array Tabs() which should be part of the TabStrip, but it seems that array doesn't exist either, so...

- What version of VB are you using?
and
- When you click on the tabs object, in the form designer, in ther properties box, does it say "OptionsTab TabStrip"?
(Replacing OptionsTab with whatever you named it)
Or does it not say TabStrip?

Because, I'm using the TabStrip control in VB6.

If it says SSTab, that's the Microsoft Tabbed Dialog Control. That is much easier to set the selected tab of:

Expand|Select|Wrap|Line Numbers
  1. YourTabObject.tab = YourObject.tab + 1
  2. '(or -1 to go back by one tab)
  3.  
Jul 7 '07 #5
Robbie
180 100+
I have VB 6.3

There is nothing called TabStrip at all.
Here, VB calls is Tab Control instead

and there is nothing like SSTab

Could you figure out the problem now?
Either I don't have one of the controls in Components which you have (the tab control), or I do and I can't see it when I look for it. >_<

Can you please go to Project -> Components, and on the Controls tab, tell me everything which is ticked?
Jul 7 '07 #6
questionit
553 512MB
I dont see Project menu.

I think probably i did not mention to you that i am using Ms Access Form and VB at back-end.




Either I don't have one of the controls in Components which you have (the tab control), or I do and I can't see it when I look for it. >_<

Can you please go to Project -> Components, and on the Controls tab, tell me everything which is ticked?
Jul 7 '07 #7
Robbie
180 100+
I dont see Project menu.

I think probably i did not mention to you that i am using Ms Access Form and VB at back-end.
Ah, well in that case I'm sorry, I have no idea how to help, or even what is going on, really. >_<
Jul 7 '07 #8
questionit
553 512MB
Can you help me with my other VBA problem :

I have a module called Stack with some code in it.
I have a Form which has some buttons on it.

When i try to compile the module, i get this error:

A module is not a valid type.

and this line is highlighted :
Dim myStack As Stack

any idea?
Jul 7 '07 #9
Robbie
180 100+
Can you help me with my other VBA problem :

I have a module called Stack with some code in it.
I have a Form which has some buttons on it.

When i try to compile the module, i get this error:

A module is not a valid type.

and this line is highlighted :
Dim myStack As Stack

any idea?
Nope, because I am really only familiar with VB6, sorry...
Jul 7 '07 #10
Killer42
8,435 Expert 8TB
Dim myStack As Stack
To do that, Stack would have to be a class, not a code module.
Jul 9 '07 #11
Killer42
8,435 Expert 8TB
As for your original question, you might get a better response in the Access forum.
Jul 9 '07 #12

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

Similar topics

1
by: Jaweed | last post by:
Hi I'm developing an ASP.NET app in Visual studio (using C# for code behind). My question is fairly simple (i think). When I go to the code behind page, the controls in the html page are made...
2
by: Herb Stull | last post by:
I need to be able to change the background color of an ASP.NET page on the fly, in code. I see a bgcolor property on the Document and if I change that it does the job nicely, but I cannot find a...
1
by: msnews.microsoft.com | last post by:
Calendar Control: Changing the Month Display and Navigation Links http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskCustomizingCalendarWebControlAppearance.asp ...
2
by: Chris Kettenbach | last post by:
Good Morning, I have a user control I dynamically load in the page_init event into a asp:placeholder control. This page also has another placeholder I would like to dynamically load controls into...
4
by: chuckdfoster | last post by:
Can I change the page title from my ASP.NET code? I know you can from classic ASP. Thanks in advance. -- Chuck Foster Programmer Analyst Eclipsys Corporation - St. Vincent Health System
12
by: GaryDean | last post by:
In the original post I failed so indicate that I am using framework 1.1....... I need to be able to change the background color of a page from code. I found an answer to this question in...
3
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
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...
5
by: charli | last post by:
I have a userform in Access/Excel with a Multipage control on. At the bottom of each multipage is a command button that sends you to the next page. When you click these command buttons, it changes...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.