What in this code is stopping me from adding new records?
Private Sub ListProd_Click()
On Error GoTo GotError
DoCmd.GoToControl "[Sales Details]"
Me![Sales Details].Form.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
Me![Sales Details]![ProductID] = Me.ListProd.Column(0)
Me![Sales Details].Form.Dirty = False
Me![Sales Details].Form.AllowAdditions = True
'DoCmd.OpenForm ("Modifiers")
ExitSub:
Exit Sub
GotError:
Select Case Err.Number
Case 2501
Resume ExitSub
Case Else
MsgBox Err.Number & vbCrLf & Err.Description & vbCrLf & "Why Not"
Resume ExitSub
End Select
End Sub
Thanks
DS