Paste for tab control ghosted out?

R

Repent

I have a form that has gotten busy enough that I want to create a
tabbed control and place the forms controls on the tabs. I create a
tab control on the form, select the controls I want, right click and
select "cut" I then go to the tab control, select a tab page, and
right click in order to select "paste" However, paste is ghosted out.

Why would this be?

chris
 
M

Mark A. Sam

Chris,
Are you right clicking on the tab? Are you able to place new controls into
the tab page?

God Bless,

Mark A. Sam
 
R

Repent

Blessings Mark;

Well;

i just tried to do this again, and now it works. Before, the "paste"
option was ghosted out. Wierd.

In His service;
chris
 
R

Repent

Mark;

when i place the controls into a tabbed control the controls no longer
work. do i need to change a reference somewhere? when i take the
controls out of the tabbed control, they start working again.

chris
 
R

Repent

scratch that, seems the controls no longer work after taking them out
of the tab control.
 
L

Linq Adams via AccessMonster.com

If you cut and paste controls from the main form to a tabbed page, the
control becomes "disconnected" from its underlying code and its hotkey
doesn't function.

In order for a button to fire its code off, for instance, you need to select
the button, go into Design Events and click on the event in question, to take
you to the code window, as if you were setting it up for the first time. Once
in the code window, simply return to Design View. The control is now
"connected" to its code and the hotkey will work.

Or you can include this code in the Form_Load event and it will re-connect
them each time the form loads.

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

You'll have to modify it for events other than OnClick.
 
M

Mark A. Sam

Sorry I haven't looked at this in a couple days. It looks like you are
taken care of.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top