PDA

View Full Version : Solved: Passing listview control value



lifeson
02-04-2008, 12:00 PM
:help
I have a user form (frmSelectedQuote) with a listview control
How do I pass the value selected to another form

I can do this with a listbox control


QuoteID = frmSelectedQuote.lstQuote.value


But the same doesn't work for a listview control

I have tried things like

quoteID = frmSelectQuote.lvwQuoute.selectedItem.text


I know this isn't a popular control (only 5 entries when I searched)
but does anybody have any ideas?

Ta

Trevor
02-04-2008, 05:08 PM
Store the value of the listbox as a string if it is a multi select listbox
Then to pass it to another for [Forms]![Form name]![Control you are passing to].

if you need more help with syntax let me know

lifeson
02-05-2008, 10:03 AM
Trevor
Thanks for the tip :thumb
What I have done is make the variable Public and call it on the second form by using
leadID = frmSelectQuote.leadID

seems to work OK