Carl Foster
Registered User.
- Local time
- Today, 09:32
- Joined
- May 29, 2006
- Messages
- 72
[SOLVED!]Please help with delete query
Hi all
I've created a delete query and I wanted to run it with the RunSQL command.
Here is the code:
When I click the delete button, it comes up with this error:
I'm not sure where the missing syntax is for this query, could anyone help please.
Thanks
Carl
Hi all
I've created a delete query and I wanted to run it with the RunSQL command.
Here is the code:
Code:
Private Sub btnDelete_Click()
RoundName.SetFocus
Dim strRoundName As String
strRoundName = Me.RoundName.Text
Dim SQL As String
SQL = "DELETE Rounds.RoundName" & _
"FROM Rounds" & _
"WHERE Rounds.RoundName ='strRoundName'"
DoCmd.RunSQL SQL
End Sub
When I click the delete button, it comes up with this error:
Run-time error '3075':
Syntax error (missing operator) in query expression
'Rounds.RoundNameFROM RoundsWHERE Rounds.RoundName='strRoundName".
I'm not sure where the missing syntax is for this query, could anyone help please.
Thanks
Carl
Last edited: