Results 1 to 3 of 3

Thread: [RESOLVED] Combo Box Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Location
    Glastonbruy
    Posts
    14

    Resolved [RESOLVED] Combo Box Error

    I have spent a few days searching the forum to find some code that will allow me to open a databse field into a combo box. I find the code i am looking for and set it up in my program and it works as far as loading the values i want from the databse into the combo box.

    The problem is that when i go to select a name from the list i want it to display the rest of this persons details in label on the form but it doesn't it just crashes the error being a run time error 3021, and says that there is no current record.

    The section of code that it is not liking is shown below bearing in mind that i have alreday open the recordset in a different section:

    Code:
    Private Sub cboPlayerSelect_Click()
    
          If MyProfileRS.RecordCount > 0 Then
    
               lblSecond.Caption = MyProfileRS("SecondName")
               lblAtempts.Caption = MyProfileRS("Atempts")
    
          End If
    
    End Sub

    Thanks In Advance

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Combo Box Error

    You first have to Find the name in the database that corresponds to the selection you made in your combo box.

    I don't see you doing anything at all with what has been selected.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Location
    Glastonbruy
    Posts
    14

    Re: Combo Box Error

    ok cheers

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