I have copied approx 20 controls from a form to a tab control for
reasons of space.
i now cannot run code triggered by the events of these controls.
for example, the following will not trigger the message box when
changed:
Private Sub cboA_Change()
MsgBox "combo A changed"
End Sub
the controls are all disabled and are only enabled when the previous
control has a value set.
any ideas?
thanks
Winshent 3 3778
Winshent,
Instead of copying and pasting, try cutting and pasting. If you copy and
then paste, the original controls stay on the form so when you paste the new
controls get new names and not the names you chose which means that even if
you then delete the original controls, the new controls will still have new
names and therefore no events associated with them.
Situation:
cboA gets copies and pasted.
Access changes the name to something like Combo294
You then delete cboA.
Your Module now has cboA_Change() but there is no control named cboA
Combo294 now exists, and looks the same, but has no events associated with.
Make sense?
--
Jeremy Shapiro
Asandia, Corp. www.asandia.com
1.866.ASANDIA (272.6342)
"winshent" <vi************ *@btinternet.co m> wrote in message
news:c8******** *************** ***@posting.goo gle.com... I have copied approx 20 controls from a form to a tab control for reasons of space.
i now cannot run code triggered by the events of these controls.
for example, the following will not trigger the message box when changed:
Private Sub cboA_Change() MsgBox "combo A changed" End Sub
the controls are all disabled and are only enabled when the previous control has a value set.
any ideas?
thanks
Winshent
On Fri, 11 Jun 2004 15:20:28 -0400, "Jeremy B. Shapiro"
<je************ ***@asandia.com > wrote: Winshent,
Instead of copying and pasting, try cutting and pasting. If you copy and then paste, the original controls stay on the form so when you paste the new controls get new names and not the names you chose which means that even if you then delete the original controls, the new controls will still have new names and therefore no events associated with them.
Situation: cboA gets copies and pasted. Access changes the name to something like Combo294 You then delete cboA. Your Module now has cboA_Change() but there is no control named cboA Combo294 now exists, and looks the same, but has no events associated with.
Make sense?
Also, if you have cut and paste the controls, there's a good chance
that those controls' events will no longer associated with the
controls, even if they are in the form's module. One quick I have
found to deal with this is within the module: ctrl-A (to highlight
everything), ctrl-X to cut, ctrl-V to paste. The cutting and pasting
of all the code will cause all the events to become re-associated with
their controls.
Chuck
Chuck Van Den Corput <NO************ *****@sympatico .ca> wrote in message news:<g0******* *************** **********@4ax. com>... On Fri, 11 Jun 2004 15:20:28 -0400, "Jeremy B. Shapiro" <je************ ***@asandia.com > wrote:
Winshent,
Instead of copying and pasting, try cutting and pasting. If you copy and then paste, the original controls stay on the form so when you paste the new controls get new names and not the names you chose which means that even if you then delete the original controls, the new controls will still have new names and therefore no events associated with them.
Situation: cboA gets copies and pasted. Access changes the name to something like Combo294 You then delete cboA. Your Module now has cboA_Change() but there is no control named cboA Combo294 now exists, and looks the same, but has no events associated with.
Make sense?
Also, if you have cut and paste the controls, there's a good chance that those controls' events will no longer associated with the controls, even if they are in the form's module. One quick I have found to deal with this is within the module: ctrl-A (to highlight everything), ctrl-X to cut, ctrl-V to paste. The cutting and pasting of all the code will cause all the events to become re-associated with their controls.
Chuck
thanks..
I did actually cut and paste (not copy and paste as described
above-incorrect statement). So i couldn't understand why all the code
was no longer working... even though the control names hadn't changed.
chuck... with regards to selecting all>cutting>pas ting all code in the
module.. I will save the module with empty code and then repaste it..
but if this doesnt work then what should i try? wont be able to work
on this til monday now.
thanks again This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robert |
last post by:
Hello.
I have been trying out the Lebans ToolTip Classes at
http://www.lebans.com/tooltip.htm, to display "balloon" style help tips in a
form. The classes I am using are located at
http://www.lebans.com/DownloadFiles/A2kTooltip.zip
So far the classes work perfectly, except that now I need to extend it to
support other controls besides...
|
by: DBQueen |
last post by:
I have a form with lines of controls. On some of the lines there are 3
controls (call them A,B,C); other lines have only control A. The controls
have been numbered sequentially (Q20, Q21....Q76) and they were put onto the
form in the numerical sequence. I have given the A's with B & C's on the
same line a tag=1; B.tag=2, C,tag=2)
I am...
|
by: TD |
last post by:
This is the code under a command button -
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.BackColor <> RGB(255, 255, 255) Then
ctl.BackColor = RGB(255, 255, 255)
End If
Next ctl
|
by: Randy |
last post by:
Hi,
is it possible to show the progress of a big file being copied e.g. in
a "progressbar"?
I tried to use file.copy - but this seems to make no sense :-(
Thanks in advance,
Randy
|
by: Steve Drake |
last post by:
All,
I have a CONTROL that contains 1 control (Control ONE), the 1 control that
it can contain 1 or 2 control (Control A and B).
Control A, raises and event and Control ONE receives this event and this
causes control B to be created, when this is done the VIEWSTATE is lost for
CONTROL B.
In the EVENT that causes CONTROL B to be created...
| |
by: Mr Newbie |
last post by:
I was thinking about developing a workflow application yesterday and was
musing over the different approaches than one could take in restricting
specific actions on a ticket( Form ) at any said stage.
One approach I have used on other systems is to prevent the action buttons
appearing. For example, if one did not have the Role of...
|
by: JohnR |
last post by:
Let's say I have an MDI parent form with a textbox. If I create an MDI
child form and, at runtime, move the MDI child window over the textbox on
the MDI parent, the textbox appears in front of the MDI child window.
How can I make the MDI child window appear in front of any controls that may
be on the MDI parent?
thanks, John
|
by: rizwanahmed24 |
last post by:
Hello
i have made a custom control. i have placed a panel on it. I want this
panel to behave just like the normal panel. The problem i was having is
that the panel on my custom control doesnt accept other controls. The
control i drag drop on it becomes the child of my custom control's
parent form and not the child of my custom control. Then...
|
by: Zebra Code |
last post by:
hi all
i should copy the items of a combo to n other combos.
it's not a cycle:
With cboColor1
.Items.Add("ffffff")
.Items.Add("cecece")
...
.SelectedIndex = 0
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |