dbTalk Databases Forums  

Listbox problem

comp.databases.ms-access comp.databases.ms-access


Discuss Listbox problem in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jimphiggins@yahoo.co.uk
 
Posts: n/a

Default Listbox problem - 12-17-2004 , 10:29 AM






This seems like a silly little problem that ought to have a simple
solution... but I've searched in vain for one.

Among the various controls on a form, I have a combobox which, when
updated, changes the rowsource of an adjacent listbox. What I then want
to do then is select the first item in the listbox. This I can do by
using Me!Listbox.Selected(0) = True, but when I do this, the form
pretty much stops responding - I can no longer click on any of the
other controls in my form. I can still click on the aforementioned
combobox and select new items from it, but I can't click on any of the
other comboboxes in the form, nor can I tab to them with the keyboard.
I've tried using setfocus to move the focus onto some other control but
this brings up 2110 run-time errors.

If this problem rings a bell with anyone, I'd be unspeakably grateful
for any tips...

Jim.


Reply With Quote
  #2  
Old   
Bas Cost Budde
 
Posts: n/a

Default Re: Listbox problem - 12-17-2004 , 11:33 AM






jimphiggins (AT) yahoo (DOT) co.uk wrote:
Quote:
This seems like a silly little problem that ought to have a simple
solution... but I've searched in vain for one.

Among the various controls on a form, I have a combobox which, when
updated, changes the rowsource of an adjacent listbox. What I then want
to do then is select the first item in the listbox. This I can do by
using Me!Listbox.Selected(0) = True, but when I do this, the form
pretty much stops responding - I can no longer click on any of the
other controls in my form. I can still click on the aforementioned
combobox and select new items from it, but I can't click on any of the
other comboboxes in the form, nor can I tab to them with the keyboard.
I've tried using setfocus to move the focus onto some other control but
this brings up 2110 run-time errors.

If this problem rings a bell with anyone, I'd be unspeakably grateful
for any tips...

Jim.

Is it a multiselect listbox? If not, you could do me!Listbox.listindex=0

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea


Reply With Quote
  #3  
Old   
Darryl Kerkeslager
 
Posts: n/a

Default Re: Listbox problem - 12-17-2004 , 04:38 PM



Me.Listbox.Value = Me.ComboBox


Darryl Kerkeslager

<jimphiggins (AT) yahoo (DOT) co.uk> wrote:
Quote:
This seems like a silly little problem that ought to have a simple
solution... but I've searched in vain for one.

Among the various controls on a form, I have a combobox which, when
updated, changes the rowsource of an adjacent listbox. What I then want
to do then is select the first item in the listbox. This I can do by
using Me!Listbox.Selected(0) = True, but when I do this, the form
pretty much stops responding - I can no longer click on any of the
other controls in my form. I can still click on the aforementioned
combobox and select new items from it, but I can't click on any of the
other comboboxes in the form, nor can I tab to them with the keyboard.
I've tried using setfocus to move the focus onto some other control but
this brings up 2110 run-time errors.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.