I have an existing inventory database that I'm trying to make changes to. The database only has 1 table with the following fields:
PartNumber
ItemDescription
Category
Location
Owner
SerialNumber.
Currently I'm using the delete button to delete a single item.
However this is not really efficient if I have to delete 300 disk drives. I have the multiple add working and I'd like to put in a delete. I'd like the delete to first search the 'SerialNumber' field and if it's blank then allow the delete multiple copies.
Is this possible?
Thanks,
Kevin
PartNumber
ItemDescription
Category
Location
Owner
SerialNumber.
Currently I'm using the delete button to delete a single item.
Code:
Private Sub cmdDeleteRecord_Click()
On Error GoTo Err_cmdDeleteRecord_Click
'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
DoCmd.RunCommand acCmdDeleteRecord
RunCommand acCmdSelectRecord
Exit_cmdDeleteRecord_Click:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit Sub
Err_cmdDeleteRecord_Click:
If Err.Number <> 3021 Then
MsgBox Err.Description
End If
' If Err = 3021 Then 'No current record
' MsgBox "Deletion Successful"
'Exit Sub
' Else
' MsgBox Err.Description
' Resume Exit_cmdDeleteRecord_Click
'End If
Resume Exit_cmdDeleteRecord_Click
End Sub
Is this possible?
Thanks,
Kevin
Comment