arunakumari02
Registered User.
- Local time
- Today, 15:26
- Joined
- Jun 2, 2008
- Messages
- 91
I have a form with with ID,title, owner and checkboxe next to it.
When I uncheck the checkbox the row with ID,title, owner should be deleted from record set but not from the main table.
The problem is the record is getting deleted in the form and in the main table. (The fact should be the record should be deleted from the recordset but not from the maintable)
The code:
Private Function RemoveRecord(intRow As Integer)
strSQL = "SELECT chklock from tblProjects WHERE chklock=True"
Set rstProjects = CurrentDb.OpenRecordset(strSQL)
Debug.Print rstProjects.RecordCount
If Forms!frmpipeline!("chkResource") = False Then
rstProjects.Delete
End If
rstProjects.Close
Me.Refresh
Call Form_Open(1)
End Function
Any help is appreciated.
When I uncheck the checkbox the row with ID,title, owner should be deleted from record set but not from the main table.
The problem is the record is getting deleted in the form and in the main table. (The fact should be the record should be deleted from the recordset but not from the maintable)
The code:
Private Function RemoveRecord(intRow As Integer)
strSQL = "SELECT chklock from tblProjects WHERE chklock=True"
Set rstProjects = CurrentDb.OpenRecordset(strSQL)
Debug.Print rstProjects.RecordCount
If Forms!frmpipeline!("chkResource") = False Then
rstProjects.Delete
End If
rstProjects.Close
Me.Refresh
Call Form_Open(1)
End Function
Any help is appreciated.