C
Charles in Iraq
Greetings.
I have designed a form to allow users to update the place and the time
of runners in a foot race. After users enter the first name, last name,
rank, place and/or time, they hit the Submit button to update the Place
and the Time of the given runner.
My problem is that I cannot get the UPDATE query to execute properly
after the user clicks on the Submit button. Everytime I hit Submit,
I get the following error:
Compile Error
Syntax Error
Here is the code that I have written again the Click event of the
submit button:
Private Sub Submit_Click()
DoCmd.RunSQL "UPDATE runners SET Place = '" & Me.Place "'," & _
" WHERE ([Last Name] = '" & Me.[Last Name] & "')" & _
" AND ([First Name] = '" & Me.[First Name] & "')" & _
" AND (Rank = '" & Me.Rank "')"
End Sub
The Last Name, First Name and Rank fields are text in both the form
and in table runners. The Place field is a number in both.
Can anybody spot the flaw here?
Regards,
Charles
I have designed a form to allow users to update the place and the time
of runners in a foot race. After users enter the first name, last name,
rank, place and/or time, they hit the Submit button to update the Place
and the Time of the given runner.
My problem is that I cannot get the UPDATE query to execute properly
after the user clicks on the Submit button. Everytime I hit Submit,
I get the following error:
Compile Error
Syntax Error
Here is the code that I have written again the Click event of the
submit button:
Private Sub Submit_Click()
DoCmd.RunSQL "UPDATE runners SET Place = '" & Me.Place "'," & _
" WHERE ([Last Name] = '" & Me.[Last Name] & "')" & _
" AND ([First Name] = '" & Me.[First Name] & "')" & _
" AND (Rank = '" & Me.Rank "')"
End Sub
The Last Name, First Name and Rank fields are text in both the form
and in table runners. The Place field is a number in both.
Can anybody spot the flaw here?
Regards,
Charles