Results 1 to 4 of 4

Thread: Program doesnt compile because variable not defined?????

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    32

    Exclamation Program doesnt compile because variable not defined?????

    Everytime i try and compile the program it gives me an error saying:

    compile error:

    variable not defined
    The piece of code where the error is cumin from is this:

    VB Code:
    1. Public Sub UpdatecboProductID()
    2.     Adodc1.Recordset.MoveFirst
    3.     Do While Not Adodc1.Recordset.EOF
    4.         cboProductId.AddItem Adodc1.Recordset.Fields("ProductID")
    5.         Adodc1.Recordset.MoveNext
    6.     Loop
    7.     Adodc1.Recordset.MoveFirst
    8. End Sub

    it saying this is not defined:

    VB Code:
    1. cboProductId

    anyone has any ideas?

  2. #2
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: Program doesnt compile because variable not defined?????

    Is cboProductId supposed to be a ComboBox?

    If yes then check that it is on the same from as this code is

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Program doesnt compile because variable not defined?????

    is that spelt correctly in relation to the combobox of that name?

    pete

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    32

    Re: Program doesnt compile because variable not defined?????

    Yes, thanx alot, the combo box was on another form.

    Thanx for all your help guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width