listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm running AC2002.

I have a listbox on a form. When a user clicks on an entry in that listbox
some additional information is displayed on the form. The listbox can have
several entries and I want the form to open with the first entry in the
listbox selected and the additional information displayed. In the Open form
event I put

me.listbox1.selected(1) = true
(populate form with additional information)

When I run the form the first entry in the listbox is selected and the
additional information is displayed as expected. The problem is that I can't
select any other entries in the listbox. When I click on a listbox entry the
new entry selected's info is not displayed and the event does not fire....why?

Any help would be appreciated.
 
Hey Peter, the statement: me.listbox1.selected(1) = true, selects the second
item in the list. This is why it is selected when you open the form. Also
check the properties for the listbox to determine if multiselect option is
set to simple or extended (Other tab). To check if the first item is
selected, try:

If me.listbox1.selected(0) = true Then
'DISPLAY INFO
End If

Also, if you want the information to be displayed for each record where the
first item is selected, move the code to the AfterUpdate Event of the
listbox.
 

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

Similar Threads

Listbox Scroll Bar 1
Requery listbox 1
Listbox problem 3
Access Cannot select items in listbox 1
Search Listbox vs Table Query 1
Faster DCount or Query 6
Listbox and Textbox 1
Evaluate ListBox Value 8

Back
Top