I really hope someone can help me with the below problem. It's driving
me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list
box (listbox1). When the user selects a value in combo1, the
AfterUpdate event kicks in, does some stuff, and moves focus to
combo2. The code looks something like this:
Private Sub combo1_AfterUpdate
'do stuff
combo2.SetFocus
End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes
off and runs listbox1_GotFocus (which has its own sub that i do not
want running).
There is simply no reference anywhere to call this sub and I it's
really starting to baffle me. I've tried deleting and readding the
controls, amongst other things, and I can only assume it's yet another
Microsoft bug.
Any help would be greatly appreciated
Jim 7 2043
goto your code module and do a Find (ctrl H) for every occurence of
"combo2" (or the actual name of your 2nd combobox). By default, the
Find (replace) dialog box is set to look in the current module. Just
type combo2 (or rather the actual name of your combobox) and click on
Find/Find Next. You may have sub for the Enter event or GotFocus Event
for combo2 which is telling it to setfocus to your listbox as soon as
combo2 gets the focus. If that isn't it, then try Repair/Compacting
your database. If that doesn't do it then I would create a new form and
copy all your stuff over to it minus the listbox and run the form. If
there is a problem you will get an error. Note: I would copy your
stuff to a new form for safety and do your testing on the new form. I
do this all the time. When ever you test something, always test the
copy.
Rich
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
first try to remark all "staff", leave only setfocus, and see if it start
working
if no - then try to post all code from your form here
--
Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <js*****@hotmail.com> wrote in message
news:5c**************************@posting.google.c om... I really hope someone can help me with the below problem. It's driving me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a value in combo1, the AfterUpdate event kicks in, does some stuff, and moves focus to combo2. The code looks something like this:
Private Sub combo1_AfterUpdate 'do stuff combo2.SetFocus End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes off and runs listbox1_GotFocus (which has its own sub that i do not want running).
There is simply no reference anywhere to call this sub and I it's really starting to baffle me. I've tried deleting and readding the controls, amongst other things, and I can only assume it's yet another Microsoft bug.
Any help would be greatly appreciated
Jim
Alex
Thanks for your reply. There are no other events, and no references
whatsoever to the combos or listboxes anywhere in the code.
Jim
"Alex Dybenko" <al**@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message
news:O9****************@TK2MSFTNGP12.phx.gbl... first try to remark all "staff", leave only setfocus, and see if it start working if no - then try to post all code from your form here
-- Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <js*****@hotmail.com> wrote in message news:5c**************************@posting.google.c om... I really hope someone can help me with the below problem. It's driving me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a value in combo1, the AfterUpdate event kicks in, does some stuff, and moves focus to combo2. The code looks something like this:
Private Sub combo1_AfterUpdate 'do stuff combo2.SetFocus End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes off and runs listbox1_GotFocus (which has its own sub that i do not want running).
There is simply no reference anywhere to call this sub and I it's really starting to baffle me. I've tried deleting and readding the controls, amongst other things, and I can only assume it's yet another Microsoft bug.
Any help would be greatly appreciated
Jim
well, in this case i can just suggest to recreate form again
--
Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <ji**********@nospam.virgin.net> wrote in message
news:2tv_b.1296$ta.1114@newsfe1-win... Alex
Thanks for your reply. There are no other events, and no references whatsoever to the combos or listboxes anywhere in the code.
Jim
"Alex Dybenko" <al**@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message news:O9****************@TK2MSFTNGP12.phx.gbl... first try to remark all "staff", leave only setfocus, and see if it
start working if no - then try to post all code from your form here
-- Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <js*****@hotmail.com> wrote in message news:5c**************************@posting.google.c om... I really hope someone can help me with the below problem. It's driving me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a value in combo1, the AfterUpdate event kicks in, does some stuff, and moves focus to combo2. The code looks something like this:
Private Sub combo1_AfterUpdate 'do stuff combo2.SetFocus End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes off and runs listbox1_GotFocus (which has its own sub that i do not want running).
There is simply no reference anywhere to call this sub and I it's really starting to baffle me. I've tried deleting and readding the controls, amongst other things, and I can only assume it's yet another Microsoft bug.
Any help would be greatly appreciated
Jim
That helps. I'll put it down to an MS bug.
Thanks
Jim
"Alex Dybenko" <al**@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message news:<u4**************@TK2MSFTNGP09.phx.gbl>... well, in this case i can just suggest to recreate form again -- Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <ji**********@nospam.virgin.net> wrote in message news:2tv_b.1296$ta.1114@newsfe1-win... Alex
Thanks for your reply. There are no other events, and no references whatsoever to the combos or listboxes anywhere in the code.
Jim
"Alex Dybenko" <al**@PLEASE.cemi.NO.rssi.SPAM.ru> wrote in message news:O9****************@TK2MSFTNGP12.phx.gbl... first try to remark all "staff", leave only setfocus, and see if it start working if no - then try to post all code from your form here
-- Alex Dybenko (MVP) http://Alex.Dybenko.com
"Jim" <js*****@hotmail.com> wrote in message news:5c**************************@posting.google.c om... > I really hope someone can help me with the below problem. It's driving > me insane. > > I have a form with two combo boxes (say, combo1 and combo2) and a list > box (listbox1). When the user selects a value in combo1, the > AfterUpdate event kicks in, does some stuff, and moves focus to > combo2. The code looks something like this: > > Private Sub combo1_AfterUpdate > 'do stuff > combo2.SetFocus > End Sub > > However, when the debugger gets to the line combo2.SetFocus, it goes > off and runs listbox1_GotFocus (which has its own sub that i do not > want running). > > There is simply no reference anywhere to call this sub and I it's > really starting to baffle me. I've tried deleting and readding the > controls, amongst other things, and I can only assume it's yet another > Microsoft bug. > > Any help would be greatly appreciated > > Jim
"wuqiang" <wu*****@hotmail.com> ????
news:5c**************************@posting.google.c om... I really hope someone can help me with the below problem. It's driving me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a value in combo1, the AfterUpdate event kicks in, does some stuff, and moves focus to combo2. The code looks something like this:
Private Sub combo1_AfterUpdate 'do stuff combo2.SetFocus End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes off and runs listbox1_GotFocus (which has its own sub that i do not want running).
There is simply no reference anywhere to call this sub and I it's really starting to baffle me. I've tried deleting and readding the controls, amongst other things, and I can only assume it's yet another Microsoft bug.
Any help would be greatly appreciated
wuqiang
"wuqiang" <wu*****@hotmail.com> ????
news:5c**************************@posting.google.c om... I really hope someone can help me with the below problem. It's driving me insane.
I have a form with two combo boxes (say, combo1 and combo2) and a list box (listbox1). When the user selects a value in combo1, the AfterUpdate event kicks in, does some stuff, and moves focus to combo2. The code looks something like this:
Private Sub combo1_AfterUpdate 'do stuff combo2.SetFocus End Sub
However, when the debugger gets to the line combo2.SetFocus, it goes off and runs listbox1_GotFocus (which has its own sub that i do not want running).
There is simply no reference anywhere to call this sub and I it's really starting to baffle me. I've tried deleting and readding the controls, amongst other things, and I can only assume it's yet another Microsoft bug.
Any help would be greatly appreciated
wuqiang This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: (Pete Cresswell) |
last post by:
Seems like I've been here before, but can't find anyting in Google.
I've got two list boxes on a form.
Seems to me like the inactive ListBox's selection rectangle should be something
like...
|
by: Alan Lane |
last post by:
Hello world:
I have a Parent form with a combobox, where the user selects a Contract or
Estimate number.
Then, on a subform, I have a listbox that gets filled with the details of
the selected...
|
by: Dave Sauny |
last post by:
Ok, its a friday, I'm at work and I cant get this to work:
I have 3 listboxes on one tab control page. when i select an item in
listbox1 i want whatever is selected on the other 2 listboxes...
|
by: Boni |
last post by:
Dear all,
is it possible to determine if a particular control (i.e. Listbox) has
focus, without implementing gotfocus/lostfocus?
I can't find such property.
P.S I know that I can implement such...
|
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:
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: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: 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,...
|
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...
|
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...
| |