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_DBAConnect With a Mentor Commented:
           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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
É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 MoreauConnect With a Mentor Senior .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
All Courses

From novice to tech pro — start learning today.