Having trouble with the access 2000 listbox . . .

G

Guest

I'm familiar with using listboxes in VB6 but I'm currently using VBA in
access 2000.
Can someone please show me how to take the selected text from a row in a
listbox and simply display the text in a textbox field ? Sounds simple enough
but I just can't seam to get it.

p.s. The listbox is populated with a field from a table using the rowsource
property.

Thank you
 
G

Guest

If you are not using a Multi Select list box, wouldn't a combo with a
rowsource type of field not be easier to deal with? It would then be
Me.txtBox = Me.cboBox

Using a list box takes a little more, and for example purposes, I will
assume a single select list box:

Me.txtBox = Me.lstBox.ItemData(Me.lstBox.ItemsSelected(0))
 
G

Guest

I haven't experienced that. I seldom use List boxes or Combo boxes as bould
controls. I don't know what the difference may be.
 
G

Guest

Okay, Thank you for your help anyway. At least now I know the proper syntax.

Thanks
Shawn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top