473,406 Members | 2,343 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,406 software developers and data experts.

Tab Control Help Wanted

Hi Everybody

I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.

Regard and Thanks in advance

Smiley Bob
Nov 13 '05 #1
11 1900
Bob Dydd wrote:
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.


There are probably a ton of ways to do this, but this is what I would do:

Forms have a Tag property whose only functionality is to store any extra
information you want about the form. On the OnClose event of the
form, store the name of the Page that has the focus in this property,
and on the OnOpen event retrieve it and set the focus to that page.

Nov 13 '05 #2
Take a look at this article:
Return to the same record next time form is opened
at:
http://members.iinet.net.au/~allenbrowne/ser-18.html

It explains how to return to the same record next time the form opens. You
could use the same approach to store the Value of the tab control in a
table, and then set the value again in the Load event of the form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"John Baker" <ba*****@ix.netcom.com> wrote in message
news:Mk****************@fe1.columbus.rr.com...
Bob Dydd wrote:
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.


There are probably a ton of ways to do this, but this is what I would do:

Forms have a Tag property whose only functionality is to store any extra
information you want about the form. On the OnClose event of the form,
store the name of the Page that has the focus in this property, and on the
OnOpen event retrieve it and set the focus to that page.

Nov 13 '05 #3
"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25**************************@posting.google.c om
Hi Everybody

I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.

Regard and Thanks in advance

Smiley Bob


Then you're going to have to store that information somewhere. You
could have a table to store such configuration information, read from it
in the form's Open or Load event, and update it in the form's Unload or
Close event -- or you could create and use a private property of the
form. That last requires a bit more code -- let me know if you want to
go that way.

The page of the tab control that is currently displayed is available
(read/write) as the Value of the tab control itself. This value is
equal to the PageIndex property of the displayed page.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Nov 13 '05 #4
John Baker <ba*****@ix.netcom.com> wrote in message news:<Mk****************@fe1.columbus.rr.com>...
Bob Dydd wrote:
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.


There are probably a ton of ways to do this, but this is what I would do:

Forms have a Tag property whose only functionality is to store any extra
information you want about the form. On the OnClose event of the
form, store the name of the Page that has the focus in this property,
and on the OnOpen event retrieve it and set the focus to that page.


Hmm. Thanks for the answers people.

I don't want to use another table to store the info so, the tag
function looks most appropiate for what I'm trying to do. Problem is I
have never seen it used in any mdb before.

I have started to write the following "air code" for the form

Private Sub CmdExit_Click()
Forms!frmTransactionTaskList.tag = "TabCtlPages.Value = PageSold"
DoCmd.Close
End Sub
' This is to receive info on whatever the last page was I was looking
at

Private Sub Form_Open(Cancel As Integer)
' Some code to retrieve the code from the Tag and set the
' focus to the last page I was looking at.
End Sub

BTW what needs to go in Form>Properties> Tag

Thanks for giving this your attention.

Smiley Bob
Nov 13 '05 #5
> I don't want to use another table to store the info so, the tag
function looks most appropiate for what I'm trying to do. Problem is I


If you distribute an mde to your users they won't be able to store the tag property...
The table approach however can always be used.
I always use a local table for local user-settings
Arno R

Nov 13 '05 #6
"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25**************************@posting.google.c om...
John Baker <ba*****@ix.netcom.com> wrote in message

news:<Mk****************@fe1.columbus.rr.com>...
Bob Dydd wrote:
I have a form with a 5 page Tab contol.

When I open the form, I would like it to be on the page I last looked
at when I previously open the form.


There are probably a ton of ways to do this, but this is what I would do:
Forms have a Tag property whose only functionality is to store any extra information you want about the form. On the OnClose event of the
form, store the name of the Page that has the focus in this property,
and on the OnOpen event retrieve it and set the focus to that page.


Hmm. Thanks for the answers people.

I don't want to use another table to store the info so, the tag
function looks most appropiate for what I'm trying to do. Problem is I
have never seen it used in any mdb before.


You actually can't use the Tag property because making a change that would
persist between uses of the form would require that you open the form in
design view to set the property. Setting it while in normal view would
only persist until the form was closed.

Use a table. The exact purpose of a table is to store data that needs to
persist. This is what databases use for storage so I fail to see why you
wouldn't want to use one. Many apps have tables that are used for odds and
ends such as this.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7
"Dirk Goldgar" <dg@NOdataSPAMgnostics.com> wrote in message news:<u#**************@TK2MSFTNGP11.phx.gbl>...
"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25**************************@posting.google.c om Then you're going to have to store that information somewhere. You
could have a table to store such configuration information, read from it
in the form's Open or Load event, and update it in the form's Unload or
Close event -- or you could create and use a private property of the
form. That last requires a bit more code -- let me know if you want to
go that way.

The page of the tab control that is currently displayed is available
(read/write) as the Value of the tab control itself. This value is
equal to the PageIndex property of the displayed page.


Hi All

Well, I Tried Tag properties but the property was not available once
the form had closed.

So, back to the drawing board. I guess it is going to have to be a
table (or maybe temp Table), to store the last used focus page.

This can then be retrieved by the open or load event, dunno which.

Any pointers to the industry standard way of doing this would be most
welcome.
Regards All Smiley Bob
Nov 13 '05 #8
Bob Dydd wrote:
Well, I Tried Tag properties but the property was not available once
the form had closed.


Sorry I led you down the wrong path. I could have sworn that I had used
that method for something similar once, but I must have been wrong.

Nov 13 '05 #9
"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25**************************@posting.google.c om

Hi All

Well, I Tried Tag properties but the property was not available once
the form had closed.

So, back to the drawing board. I guess it is going to have to be a
table (or maybe temp Table), to store the last used focus page.

This can then be retrieved by the open or load event, dunno which.

Any pointers to the industry standard way of doing this would be most
welcome.
Regards All Smiley Bob


I don't know about the "industry standard", but as Rick Brandt said,
lots of applications have little tables of configuration info. Do you
have any specific questions about how to implement this?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
Nov 13 '05 #10
"Dirk Goldgar" <dg@NOdataSPAMgnostics.com> wrote in message news:<OG*************@TK2MSFTNGP09.phx.gbl>...
I don't know about the "industry standard", but as Rick Brandt said,
lots of applications have little tables of configuration info. Do you
have any specific questions about how to implement this?


Thanks for your attention to my problem.

I was definately barking up the wrong tree with tag properties.

I took on board what you and others said about a table, and did it that way.

I learned a lot using Allen Browne's code, and with some juggling I made that work.

Once again thanks people.

Smiley Bob
Nov 13 '05 #11
Well done, Bob. :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Dydd" <re**************@yahoo.co.uk> wrote in message
news:25*************************@posting.google.co m...

I took on board what you and others said about a table, and did it that
way.

I learned a lot using Allen Browne's code, and with some juggling I made
that work.

Once again thanks people.

Smiley Bob

Nov 13 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Karuppasamy | last post by:
Hi I have created a User Control Containing a Panel and Rich Text Box. The Panel contains some other controls used for formatting the Text entered in the Rich Text Box. My Requirement is...
5
by: Michael | last post by:
Ive been programming for some time now, so i wanted to get into graphics, but i wanted to see if I could make a Picture Viewer. I have no experience with the picture control, ive tryed the MSDN...
2
by: Hawk | last post by:
I have a custom menu control that I am creating using C#. I am rendering HTML from a StringBuilder in my control to add the needed JavaScript to the HTML output. I need to have the JavaScript...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
7
by: Thomas Scheiderich | last post by:
I have a calander control that is inside a large cell. I have the width set up to "Width='100%'". What I would like it to do is be 50 pixels less that the 100% so that it would always be a blank...
11
by: Christoph Boget | last post by:
When building a form using Infopath, you can define a repeating section and stick form fields in that section. I'm curious if ASP.NET has a similar control to make it easy to design something...
6
by: Davids | last post by:
having a 100% working aspx page I wanted to create a user control from a small DataList section (which has an ID="DataList1") of the page, so I created an ascx file with the DataList and Register...
15
by: Amit D.Shinde | last post by:
I am adding a new picturebox control at runtime on the form How can i create click event handler for this control Amit Shinde
0
by: Joel Barsotti | last post by:
Hi, So with my search control I want people to be able to enter some text and press enter and have the search submit. I was doing this with javascript using the onKeyPress event for the...
7
beacon
by: beacon | last post by:
I am creating a form using the SSTab control. For the first tab I wanted more than one page and had to copy the control in order to achieve this. I then placed next page and previous page buttons off...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.