Hi,
I have a tab control with couple of pages on it, like:
InfoPage, Page1, Page2, Page3.
On each page there are various text boxes and combo boxes.
What I need to do is to make one of these comboboxes (i.e. cboPeriod1) to be on Page1, Page2 and Page3, but not on the InfoPage.
The problem is that the control needs to be exactly the same.
This is simplified - actually I have 5 comboboxes and 10 reactangles, for which the VBA code already exist. And these 15 controls need to be on 4 different pages. And I would like to avoid puting additional 45 same controls with different name, as that would mean adding much more VBA code to do the same thing with each of these controls.
Is this possible?
Tnx.
There is a little trickery that you can use to accomplish what you are requesting: - Create a Combo Box on your Form 'outside' of the Tab Control.
- Drag-N-drop the Combo Box along with the associated Label into any Page of the Tab Control.
- Position it precisely on the Page and Rename it cboPeriod1.
- Set any other Properties of the Combo Box as required.
- The Control will now appear on every Page of the Tab Control.
- Write Code in the Tab Control's Change() Event to display the Combo Box for every Page except the one titled InfoPage.
- Private Sub TabCtl0_Change()
-
'In my Test Database, the Value of the InfoPage Tab is 2, but it may not
-
'be the same in your scenario
-
Me![cboPeriod1].Visible = Me![TabCtl0].Value <> 2
-
End Sub
3 5752
There is a little trickery that you can use to accomplish what you are requesting: - Create a Combo Box on your Form 'outside' of the Tab Control.
- Drag-N-drop the Combo Box along with the associated Label into any Page of the Tab Control.
- Position it precisely on the Page and Rename it cboPeriod1.
- Set any other Properties of the Combo Box as required.
- The Control will now appear on every Page of the Tab Control.
- Write Code in the Tab Control's Change() Event to display the Combo Box for every Page except the one titled InfoPage.
- Private Sub TabCtl0_Change()
-
'In my Test Database, the Value of the InfoPage Tab is 2, but it may not
-
'be the same in your scenario
-
Me![cboPeriod1].Visible = Me![TabCtl0].Value <> 2
-
End Sub
Hi ADezii,
Yesterday, I've thought that it probably isn't possible, so I've just put the specific controls outside the tab control, and I came to conclusion that it even has some advantages if it's outside the tab control.
So, I haven't test your solution yet, I might maybe in later stages of development.
I was very suprised to find out that the solution actually exist. Thank you!
You are welcome. It technically is not a solution in that the same Control, a single Control, can exist on all but one Page of a Tab Control, but I feel as though it is a viable work around.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dan.roffman |
last post by:
Is there a way to span a report over multiple pages. I think you could
do something like count the number of lines and if it exceeds a certain
number, then put the rest of th text into another RTF...
|
by: matt |
last post by:
I'm using this to scan Multiple pages into Access 2k :-
Call KillTempFile
strTempFile = TempFile(False, "scan")
Me.scanControl.MultiPage = True
Me.scanControl.ScanTo = FileOnly...
|
by: ghadley_00 |
last post by:
MS Access Create form / report with multiple pages using different
background images
Hi,
Would like to have users fill out a multipage form, and then click a
print button, which pulls up the...
|
by: Novice |
last post by:
Hey all, I have finally managed to create a Custom WebControl and am using a
technique from another programmer to maintain state between pages - I would
just like to validate this idea.
...
|
by: tshad |
last post by:
Can I set up multiple pages in the same Location tag? I thought I saw
somewhere that I could. I tried the following, but it doesn't work.
***************************************************...
|
by: ray well |
last post by:
hi,
i need to print multiple pages on a printer. this is what i'm using now
Sub Print()
Dim PrintDoc As New PrintDocument
AddHandler PrintDoc.PrintPage, AddressOf Me.PrintText
Do While...
|
by: DXJas |
last post by:
If I have a gridview control in a web page and it has multiple pages of
records. How do I allow the user to print the multiple pages?
--
Jas
|
by: anna_john |
last post by:
How do i link to multiple pages using the same link?
i would like to get an answer related to jsp or javascript
|
by: Matthew Kitchin \(Usenet/Lists\) |
last post by:
Hello,
I've got multiple pages on the same server that all have the same drop down
boxes in them. It is a list of all our facilities. Every time there is a
change, I have to change it on every...
|
by: raj3109 |
last post by:
Hi experts, I’d like to have some helps from you guys.
I need to create an app with C# and Crystal Report.Net using VS 2008 for a Landscape & Nursery company. The company will send out coupon...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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...
|
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
|
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...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
| |