How to move the existing text box, combo box ...etc into tab control?

s1police

Registered User.
Local time
Today, 07:19
Joined
Aug 1, 2007
Messages
50
Dear All,

I have an existing form in my database already design. And now, I have to create another page which is related to the same record within the existing form. So I want to create an "Tab Control" for easy use.

However, when I try to move the existing form's components into the new tab control, it seems that all are visible when i select another tab....

What i should do, so that I can copy and paste the same components into the tab control? I don't want to re-create each fields because those are already existed.

Please help.
 
You can not drag and drop and get this to work. You need to Cut and Paste. 1st select and cut the control and then select the tab you want and then paste it.
 
Thank you for your sharing!! I got it!!

Victor
 
note that when you cut and paste to a tab control, you will then have to re-set any event handlers

the code will be there, but the event handler reference will disappear.
 
Gemma is correct but I believe all you need to do is press the "..." build button and Access will find the previous code.
 
Here's some code by a gentleman who goes by the name of ADezii on TheScripts Access Forum. The code can be placed behind a temporary command button and it'll "re-connect" the moved controls and their click events with a single click of the button. This particular code is for yhr click event, but should be easily modified for other events!

Code:
Dim ctl As Control

For Each ctl In Me.Controls
If ctl.OnClick = "" Then
ctl.OnClick = "[Event Procedure]"
End If
Next
 

Users who are viewing this thread

Back
Top Bottom