Help

  • Thread starter Thread starter CribbsStyle
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top