populate combo box from dataset

Hi,
Please help with the code below, i have a dataset and i need to filter on 1 of the tables for certain values and then popultae my combo box
here is the code i am using but i am getting the following error
"Cannot bind to the new display member"
ItemName is my field in teh Dataset

            'This is for the combo box on the SCI Users pannel
            drows = SPds.Tables("lstLookupList").Select("Category = 'SCIUsersStatus'") '
            With frmMain.cmbSCIUsersStatus
                .DataSource = drows
                .DisplayMember = "DisplayField"
                .ValueMember = "ItemName"
            End With


thanks
LVL 4
CraigLazarAsked:
Who is Participating?
 
SQL_SERVER_DBACommented:
           With frmMain.cmbSCIUsersStatus
                .DataSource = drows
                .DisplayMember = "ItemName"
                .ValueMember = "ItemID"
.databind
            End With
0
 
Éric MoreauSenior .Net ConsultantCommented:
Do you have a field name DisplayField in your datatable?
0
 
CraigLazarAuthor Commented:
Hi
i checked that after i posted the code sorry
           'This is for the combo box on the SCI Users pannel
            drows = SPds.Tables("lstLookupList").Select("Category = 'SCIUsersStatus'") '
            With frmMain.cmbSCIUsersStatus
                .DataSource = drows
                .DisplayMember = "ItemName"
                .ValueMember = "ItemID"
            End With

still same error
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
Éric MoreauSenior .Net ConsultantCommented:
are you sure that ItemName and ItemID are columns in SPds.Tables("lstLookupList")?
0
 
Éric MoreauSenior .Net ConsultantCommented:
.databind is only available in ASP.Net. Are you doing a web application?
0
 
CraigLazarAuthor Commented:
Hi,
Emoreau no its a vb.net fat client that i am using
0
 
Éric MoreauSenior .Net ConsultantCommented:
So Databind does not exist as a method.

are you sure that ItemName and ItemID are columns in SPds.Tables("lstLookupList")?
0
 
CraigLazarAuthor Commented:
thanks for the input
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.