Click here to Skip to main content
15,917,455 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to pass text value from form to data report???[urgent] Pin
campbells12-Oct-06 22:53
campbells12-Oct-06 22:53 
GeneralRe: how to pass text value from form to data report???[urgent] Pin
Dave Sexton13-Oct-06 0:20
Dave Sexton13-Oct-06 0:20 
GeneralRe: how to pass text value from form to data report???[urgent] Pin
campbells15-Oct-06 16:56
campbells15-Oct-06 16:56 
GeneralRe: how to pass text value from form to data report???[urgent] Pin
Dave Sexton15-Oct-06 20:53
Dave Sexton15-Oct-06 20:53 
GeneralRe: how to pass text value from form to data report???[urgent] Pin
campbells15-Oct-06 21:29
campbells15-Oct-06 21:29 
QuestionEntering Next Character in the Text Box using VB 6 Pin
ghelai_cute12-Oct-06 16:24
ghelai_cute12-Oct-06 16:24 
AnswerRe: Entering Next Character in the Text Box using VB 6 Pin
UltraCoder12-Oct-06 17:37
UltraCoder12-Oct-06 17:37 
Questionlist box and selected value Pin
ranro200612-Oct-06 13:14
ranro200612-Oct-06 13:14 
I am having a problem with the SelectedValue of a list box. I have a List Box that has its data source as a table. The columns in the table are ID and Name. ID is an Integer and Name is a String. I have them bound to the ListBox in this fashion:

ListBox.DataSource = Table1DataSet
ListBox.DisplayMember = “Table1.Name”
ListBox.ValueMember = “Table1.ID”

Whenever I try to use the value member of the list box I get an error. For instance if I declare:

Dim x As Integer = ListBox1.SelectedValue

It says InvalidCast Exeption. If I try to put it as a parameter for a sql query like

MyCmd.Parameters.AddWithValue("@FID", ListBox1.SelectedValue)

It gives an argument exeption when I try to fill my data adpater. Could someone tell me what I am doing wrong.





AnswerRe: list box and selected value Pin
Christian Graus12-Oct-06 14:22
protectorChristian Graus12-Oct-06 14:22 
GeneralRe: list box and selected value Pin
ranro200612-Oct-06 15:20
ranro200612-Oct-06 15:20 
GeneralRe: list box and selected value Pin
Christian Graus12-Oct-06 15:24
protectorChristian Graus12-Oct-06 15:24 
Questiondisable image download in web broswer programmtically Pin
my_btr12-Oct-06 10:28
my_btr12-Oct-06 10:28 
AnswerRe: disable image download in web broswer programmtically Pin
Dave Kreskowiak12-Oct-06 10:37
mveDave Kreskowiak12-Oct-06 10:37 
QuestionChanging Logon/Bootskin Pin
UltraCoder12-Oct-06 9:48
UltraCoder12-Oct-06 9:48 
AnswerRe: Changing Logon/Bootskin Pin
Dave Kreskowiak12-Oct-06 10:33
mveDave Kreskowiak12-Oct-06 10:33 
GeneralRe: Changing Logon/Bootskin [modified] Pin
UltraCoder12-Oct-06 10:37
UltraCoder12-Oct-06 10:37 
GeneralRe: Changing Logon/Bootskin Pin
Dave Kreskowiak12-Oct-06 12:04
mveDave Kreskowiak12-Oct-06 12:04 
GeneralRe: Changing Logon/Bootskin Pin
UltraCoder12-Oct-06 12:16
UltraCoder12-Oct-06 12:16 
Questionget type of uninitialized object Pin
Jason18812-Oct-06 8:14
Jason18812-Oct-06 8:14 
AnswerRe: get type of uninitialized object Pin
Dave Kreskowiak12-Oct-06 10:32
mveDave Kreskowiak12-Oct-06 10:32 
GeneralRe: get type of uninitialized object Pin
Jason18813-Oct-06 3:48
Jason18813-Oct-06 3:48 
GeneralRe: get type of uninitialized object Pin
Dave Kreskowiak13-Oct-06 4:41
mveDave Kreskowiak13-Oct-06 4:41 
GeneralRe: get type of uninitialized object Pin
Jason18813-Oct-06 7:18
Jason18813-Oct-06 7:18 
QuestionHow to lick to list boxes to a database Pin
ranro200612-Oct-06 7:33
ranro200612-Oct-06 7:33 
QuestionMissing Items.... Pin
CCG312-Oct-06 7:31
CCG312-Oct-06 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.