venu_resoju
Registered User.
- Local time
- Today, 06:39
- Joined
- Dec 29, 2010
- Messages
- 130
all my dear friends..
Happy Diwali....
I am getting a problem with delete button....
I want to delete record from subform and Table..
Table
ayroll
Subform
ayrollSearchQuery
Form
ayrollog
I am giving the code is ....
but it is not working...it's saying
thanking you ...
Happy Diwali....
I am getting a problem with delete button....
I want to delete record from subform and Table..
Table

Subform

Form

I am giving the code is ....
Private Sub Command58_Click()
'check existing selected record
If Not (Me.PayrollsearchQuery.Form.Recordset.EOF And Me.PayrollsearchQuery.Form.Recordset.BOF) Then
'confirm delete
If MsgBox("Are you sure you want to delete", vbYesNo) = vbYes Then
'delete now
CurrentDb.Execute "Delete * FROM Payroll" & _
"WHERE PayrollID=" & Me.PayrollsearchQuery.Form.Recordset.PayrollID & ""
'refresh data in list
Me.PayrollsearchQuery.Form.Requery
End If
End If
End Sub
but it is not working...it's saying
please any body help me friends....Run-Time Error:3131
Syntax error in FROM clause
thanking you ...