Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Adding information to a ComboBox in Visual Basic

Adding information to a ComboBox in Visual Basic

Adding information to a ComboBox in Visual Basic

I currently have a table in Microsoft access that I am trying to pull data from and then put into a ComboBox in Visual Basic.  The following code is taken from a training manual that I am currently using.  I am new to Visual Basic.

    Dim rs As Object
    Dim sSql$
    sSql = "SELECT NOMSPEC From NominalSpec WHERE(type =    'AT_Process')"
    If Not gProjectDb.ExecuteSQL(sSql, rs) Then Exit Function
    If rs Is Nothing Or rs.EOF Then Exit Function
    Do While Not rs.EOF
    cmbPspecNom.AddItem rs.Fields("NOMSPEC")
    cmbPspecNom.Text = NominalSpec.Text

I am getting a Compile Error when trying to write the .dll file.  "Method or data Member not found".  The error is referring to my line of code where I am using ".AddItem"

Some of the information in the code like "AT_Process, NominalSpec,and NOMSPEC refer to variables that are specific to what I am trying to implement.

Any suggestions?

RE: Adding information to a ComboBox in Visual Basic

I am not sure if I quite understand what you are explaining, but regardless, thank you for your help.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close