VB combobox advice

By Dillon.damien ·
I have set up a movie quote website which populates with the primary keys from a table in an access database (movie table).

So the combobox lists all the movieID's I have in my table. When I save to my "movie quote" table it saves the corresponding movieID to that table. This works from the databases perspective but clearly not good for a user as they will not know which ID corresponds to which movie in the combobox.

Could anyone recommend a way that I could display the movie name in the combo but have the corresponding movie ID saved to the database when selected. This has become a bit of a road block for me.

The code I use to populate the combobox is below.

Public Sub PopulateComboBox()


        Dim i As Integer, strMovieID As String

           For i = 1 To objDS.Tables("Movies").Rows.Count
             strMovieID = objDS.Tables("Movies").Rows(i - 1).Item("MovieID")


End Sub

I would appreciate any help or ideas.


This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums