I'm using VB6 to connect to MS Access and I'm trying to delete all records from 3 baseball data tables that have a specific GameID associated with them. The GameID is typed into Text1.Text --- I can't get it to work. It doesn't throw an error, it simply ignores the code. Here's the code I have:
Dim cnn As New ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\MyDB.mdb"
cnn.Execute "delete * from Batting Where GameID = " & Text1.Text
cnn.Execute "delete * from Pitching Where GameID = " & Text1.Text
cnn.Execute "delete * from BoxScores Where GameID = " & Text1.Text
MsgBox ("Delete of data is complete."), vbInformation
Thanks for any assistance...