How do I retrieve the value from a combo box?


Author
Message
Robert Carl Johnson
Robert Carl Johnson
StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)StrataFrame Novice (64 reputation)
Group: Forum Members
Posts: 48, Visits: 130
Hi all. I am a little confused regarding lists and combo box's I guess. I looked at the tutorial and but I don't see how you "get" the values from the selected record from the list or combo box. I have a combo box set up on my custom password form with two columns, FullName and ID: {0},{1} respectivly. Now, the value I need to retrieve is the ID value. I tried placing some code in the events SelectedIndexChanged with no joy. I'm not sure of the arguments to use to get my value. Can someone please help me. ID is an Integer.



The second part: What I'm trying to do is, after getting the ID number is send that number to my function and have the funtion run a select to get the employee record and return to me the password. I will then assign it to my var EmpPW as seen below. cboFullName is the name of the Combobox and I'm guessing at .ValueMember



Am I wrong or right? If incorrect then how do I do this?



My code to send to my Function is: EmpPW = Me.EmployeeBO1.GetEmpoyeeByID(txtFullName.ValueMember.



Thanks in advance



Robert

(New to .Net)
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Boy do I feel dumb. I didn't think to check normal behavior.

Don't feel this way at all!!!  I am glad that you asked as at least you now know how it works.  If you don't ask you don't learn Smile  Please don't let this deter you from posting questions in the future!!! Smile

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search