varley Posted January 25, 2003 Posted January 25, 2003 i have a databound listbox that i am populating from an Access table w/o any problems. The table only has one field in it so this is a no brainer. My problem is in getting the selected item from the listbox. when i try this with a .SelectedItem call i get "Cast from type 'DataRowView' to type 'String' is not valid." I was doing fine getting selected values when using a Collection. My problem just started when i Bound the listbox to a dB table. I need a clue - Thanks - tom Quote
Moderators Robby Posted January 25, 2003 Moderators Posted January 25, 2003 Try...(no casting needed) ListBox1.SelectedValue Quote Visit...Bassic Software
varley Posted January 25, 2003 Author Posted January 25, 2003 Logically this should work. In fact it was my first try. That is what threw the casting error. Quote
Moderators Robby Posted January 25, 2003 Moderators Posted January 25, 2003 I just tried it and it worked, can you post your routine. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.