Hi,
I'm using a listbox as a lookup on a master file maintenance (add/change/delete) screen. I have the list as just one row high so that I can scroll up and down the primary keys for the records and select which one I want to edit. I can also navigate via forward and backward (and first and last) arrow keys as well. I put in some code to set the index of the listbox so that if the record on the screen changes so does the lookup field as follows :-
List1.ListIndex = recNum
List1.ensureIndexIsVisible 1
What I find is happening is that the correct (ie current) record is being highlighted in the list, but it may be the next one above or below the one actually being displayed. Is this a bug in the 'ensureIndexIsVisible' function, or am I doing something wrong?
Thanks
Roger L
ps Going on holiday to Tasmania tomorrow so I'll give you a rest for 2 weeks!