Listbox requery issue

Taff

Registered User.
Local time
Today, 14:42
Joined
Feb 3, 2004
Messages
158
Hi all,

I have a a form with a listbox on. When I click a command button it opens a form depending on what I have selected in my listbox.

When the listbox is requeried it automatically selects the top record from my listbox. It is possible to requery the listbox but keep the record I originally had selected - Selected?

Thanks

Ant.
 
Not too sure what you mean by requery - in the code are you calliing listbox.requery after the child form has closed?

I have tried doing a simple listbox requery and the selection remains as selected? :confused:
 
Hi GUIDO22,

Ignore the bit about opening a form.

If I have 10 records in ListProgrammes and I requery the list using:-

Me.ListProgrammes.Requery

The first row of the listbox is selected and I would like it to return to the row originally selected listbox.

Ant.
 
You mean this:
  • 7th record was selected
  • User chooses new item in list
  • Me.ListProgrammes.Requery
  • Me.ListProgrammes=Me.ListProgrammes.ItemData(6)
  • 7th record is selected again

?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom