access reorder tabs @ runtime

dodyryda

Registered User.
Local time
Today, 10:31
Joined
Apr 6, 2009
Messages
61
hi .

I am wondering if it is possible to allow the user to reorder a tab control's pages at run time. Looking at some vb.net code at http://dotnetrix.co.uk/tabcontrol.htm it's possible there just wondering what my options are in access?

can anyone make some suggestions..
 
In Access the tab control doesn't have the DrawMode property. They are fixed tabs.
 
thanks vbaInet so no way forward then :-(
 
There are ways of simulating it but that's high level programming and using APIs. Just not worth the hassle if it's possible in .net.
 
thanks vbaInet for the insight - rather not have to port my adp to .net though unless absolutely necessary as I'd have to rewrite everything i've already done. Unless there's a relatively simple method to port it across..
 
As with any cross from one platform to another, there would always be a significant amount of recoding and sometimes even restructuring to do. VBA isn't quite the same as VB.net even there are similarities.
 
Sure you can set the page order easily enough for a tab control:

Me.TabCtl4.Pages(0).PageIndex = 1

just set the page index to what you want.
 
I think the OP wants to be able to drag and drop the tabs. That was my impression, could be wrong.
 
I think the OP wants to be able to drag and drop the tabs. That was my impression, could be wrong.

Dragging and dropping is out, but you could provide an interface for reordering. That wouldn't be hard to do at all.
 
Dragging and dropping is out, but you could provide an interface for reordering. That wouldn't be hard to do at all.
That's right. Thinking about it, the OP can create left/right buttons on top of the tab to facilitate the moving of the tabs (to the left or the right).
 
Tabs are tabs so why the need to move them? It would take more clicks to move them than it would to view them? And it would only be temporary as you ould not be able to save the page order when you close the form.

Usually the sequence is set for a reason by the developer. So again why the need?
 
And it would only be temporary as you ould not be able to save the page order when you close the form.
You could save the order. A table could save it.

And it would be interesting to know why they would like this functionality, but I can think of a few reasons why you might want to do it, depending on what exists on the tabs. The most notable thing I can think of at the moment would be a set of tasks which need to happen, but that could be done in any order as long as they were done. A user might want to reorder the steps if they had a desire to do it in a non-standard order. Another reason I can think of, which would relate to a program I had written quite a long time ago, is that you could have a CMS program and there are tabs which have different data and there might be so many tabs for the different data that they don't all fit and you have to use the scroll (and multi-line might not be feasible). So, if you can reorder based on the tabs YOU use the most often, that could be very user friendly.

So, anyway, I hope the OP responds and lets us know as it would be interesting to know.
 
I am aware you could save the revised order in a table, but that table would have to be local to the user as different users may have different preferences. And you would need to consider how busy the contents of the tabs are as Access would have to repaint the entire tabl control everytime it changes its the page order. If the contents were of similar content I would consider using a tab strip as opposed to a tab control. However as we do not know the content as of now we can only summise.
 
sorry for the delay getting back...

the reason i need to move them as each tab holds notes for a specific depot. Raher than have seperate projects for each depot i want to allow the user to reorder the tabs so each depot can set 'their' tab to appear first. & remember this location..

.. this is my reason but i can think of loads more,, especially as bob says user friendlyness..

- tab content: 3 tabs have a single memo field holding notes based on a calendar control (ie. notes for each day, for each depot) 1 tab holds menu ( command buttons )
 
Last edited:

Users who are viewing this thread

Back
Top Bottom