how do i msgbox the first entry in a listbox in ms-access with vba?
when i do this, the whole form freezes up for some reason
I__
2009-12-22 22:23:41
What is the datasource to the Listbox, and did you try stepping throught the code?
astander
2009-12-22 22:26:28
as you know the debugger in access isnt so powerful you can't step through
I__
2009-12-24 03:14:13
+6
A:
Is the item selected in a simple list box (that is, not multi-select)? If so:
MsgBox Me.ListBox
Is it a selected item in a multi-select list box? if so:
MsgBox Me.ListBox .Column(0, Me.List0.ItemsSelected(0))
If you simply want the first item whether or not it is selected:
MsgBox Me.List0.Column(0, 0)
Or
MsgBox Me.List0.ItemData(0)
Remou
2009-12-22 22:26:22