I have an unbound listbox on a popup-dialog form that is populated with several hundred entries from a union query. The user can only select one record (Multiselect=None). Upon opening the form, I want to highlight (select) the user's previous entry at this screen with:
lstboxSelectACitation.Selected(RecNuminLstBox) = True
This works as long as the record is one of the first 20 or so that can be displayed in the listbox as sized. If the selected record is off-screen, I'd like the listbox to adjust to display it - for example, display the selected record in the middle of the listbox with an equal number of records above and below. As it works now, the only adjustment is that the listbox shows the 20 records above the selected one. The selected record is the first one just below the listbox (that is, if you scroll the listbox up one, you'd see the selected record at the bottom of the listbox).
Does anyone know how to make the selected record display in the middle of the listbox or at least somewhere in the listbox so the user can see it without scrolling?
Thanks!
dftjsn
lstboxSelectACitation.Selected(RecNuminLstBox) = True
This works as long as the record is one of the first 20 or so that can be displayed in the listbox as sized. If the selected record is off-screen, I'd like the listbox to adjust to display it - for example, display the selected record in the middle of the listbox with an equal number of records above and below. As it works now, the only adjustment is that the listbox shows the 20 records above the selected one. The selected record is the first one just below the listbox (that is, if you scroll the listbox up one, you'd see the selected record at the bottom of the listbox).
Does anyone know how to make the selected record display in the middle of the listbox or at least somewhere in the listbox so the user can see it without scrolling?
Thanks!
dftjsn