AccessDiscussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
1) I have a listbox of names which is populated by one of several queries, selected by VBA according to the user's selection on a form. I want to fix it so that when the listbox opens the item highlighted is the first name alphabetically. I wrote code which identifies the correct name, the problem is that I can't find how to make the list box select it.
2)I was surprised to find that the requery method seems to have no effect while the action works just fine - any clues to why that is?
Me.lstPicklist.Requery 'This method doesn't have any effect
DoCmd.Requery "lstPicklist" 'This works fine