Can anyone help me...my msgbox seems to be disallowing my users from selecting a new symbol from my combo box called comboSelectSymb ol. I ultimately want my users to be able to select any number of stock symbols from my combobox comboSelectSymb ol and have these symbols added to a table called TempSymbol. There are over 4000 symbols to select from. Thank you for any help!
Private Sub comboSelectSymb ol_AfterUpdate( )
Dim MsgAnswer As String
Dim strSQL As String
MsgAnswer = 6
DoCmd.SetWarnin gs (False)
DoCmd.RunSQL "DELETE * FROM TempSymbol"
Do While MsgAnswer = 6
strSQL = "INSERT INTO TempSymbol (Symbol)"
strSQL = strSQL & " VALUES ('" & comboSelectSymb ol & "');"
DoCmd.RunSQL strSQL
MsgAnswer = MsgBox("Do you want select another symbol? ", vbYesNo)
If MsgAnswer = 6 Then
Me!comboSelectS ymbol.SetFocus
Me!comboSelectS ymbol.Dropdown
End If
Loop
DoCmd.SetWarnin gs (True)
End Sub
Private Sub comboSelectSymb ol_AfterUpdate( )
Dim MsgAnswer As String
Dim strSQL As String
MsgAnswer = 6
DoCmd.SetWarnin gs (False)
DoCmd.RunSQL "DELETE * FROM TempSymbol"
Do While MsgAnswer = 6
strSQL = "INSERT INTO TempSymbol (Symbol)"
strSQL = strSQL & " VALUES ('" & comboSelectSymb ol & "');"
DoCmd.RunSQL strSQL
MsgAnswer = MsgBox("Do you want select another symbol? ", vbYesNo)
If MsgAnswer = 6 Then
Me!comboSelectS ymbol.SetFocus
Me!comboSelectS ymbol.Dropdown
End If
Loop
DoCmd.SetWarnin gs (True)
End Sub
Comment