Full Version: List box question...
UtterAccess Forums > Microsoft® Access > Access Forms
lukesb
Hi Everyone
I have a form that lets a user create new part numbers. On that form is a list box that is populated by a query that has all my part numbers in, sorted A-Z...
This is there so that the user can be aware of the last part number created. On open of the form, I set focus to the list box and then sendkeys{end} to shoot to the last part created...
This doesn't always work though. It seems the sendkeys method of doing this is pretty unreliable...
Can anyone tell me a better way to move to the last choice on a list box, or any other ideas of how I could show the last part number in a list to a user..?
Thanks, as always...
Luke
Larry Larsen
Hi Luke
Let's try..
CODE
Me.YourLstboxName = Me.YourLstboxName.Column(0, Me.YourLstboxName.ListCount - 1)

thumbup.gif
lukesb
Larry, that works superb. Another pickle you've gotten me out of...
Cheers mate...
thumbup.gif
Luke
Larry Larsen
Luke..LOL
Don't forget when the project "bonus" comes through..!!
thumbup.gif
lukesb
laugh.gif blush.gif laugh.gif
LPurvis
Yeah - whereupon you'll find Larry at the 19th hole. :-)
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.