Hi,
I am seeking some assistance to edit my VBA code to update boolean field I have in my table(201Assets). I have a working Delete button and I have copied the code and attempted to make some changes to instead of deleting the record, I would like a boolean field (AssetFlag) to be made True instead.
Any assistance would be greatly appreciated
I am seeking some assistance to edit my VBA code to update boolean field I have in my table(201Assets). I have a working Delete button and I have copied the code and attempted to make some changes to instead of deleting the record, I would like a boolean field (AssetFlag) to be made True instead.
Code:
Private Sub cmdSoftd_Click()
'Hide record
'check existing selected record
If Not (Me.subformAssets.Form.Recordset.EOF And Me.subformAssets.Form.Recordset.BOF) Then
'confirm hide
If MsgBox("Are you sure you want to HIDE this Asset?", vbYesNo) = vbYes Then
'hide now
CurrentDb.Execute "UPDATE 201Assets SET AssetFlag = True _
WHERE stdid=" & Me.subformAssets.Form.Recordset.Fields("stdid")
'Refresh data in list
Me.subformAssets.Form.Requery
End If
End If
End Sub
Any assistance would be greatly appreciated