Help

C

CribbsStyle

Can anyone tell me this doesnt work...

Private Sub Frame57_AfterUpdate()
On Error Resume Next
Dim sportid As Integer
Select Case Frame57.Value
Case 1
sportid = "1"
Case 2
sportid = "2"
Case 3
sportid = "3"
Case 4
sportid = "4"
Case 5
sportid = "5"
Case 6
sportid = "6"
Case 7
sportid = "7"
Case 8
sportid = "8"
End Select
Combo170.RowSource = "Select Teams.TeamName " & _
"FROM Teams " & _
"WHERE Teams.SportID = '" & strCountry & "' " & _
"ORDER BY Teams.TeamName;"

End Sub

I have a table like this...

Teams
 
C

CribbsStyle

Can anyone tell me this doesnt work...

Private Sub Frame57_AfterUpdate()
On Error Resume Next
Dim sportid As Integer
Select Case Frame57.Value
Case 1
sportid = "1"
Case 2
sportid = "2"
Case 3
sportid = "3"
Case 4
sportid = "4"
Case 5
sportid = "5"
Case 6
sportid = "6"
Case 7
sportid = "7"
Case 8
sportid = "8"
End Select
Combo170.RowSource = "Select Teams.TeamName " & _
"FROM Teams " & _
"WHERE Teams.SportID = '" & strCountry & "' " & _
"ORDER BY Teams.TeamName;"

End Sub

I have a table like this...

Teams

Actually I have WHERE Teams.SportID = '" & sportid & "' " & _

NVM It works now, lol
 
C

CribbsStyle

Actually I have WHERE Teams.SportID = '" & sportid & "' " & _

NVM It works now, lol

OK, One Problem...How do i get it to store the TeamID, not the TeamName
 
Top