M
Musa via AccessMonster.com
Hello,
I want to add an Edit Command Button.
The Form Properties are set to DataEntry = Yes , and AllowAdditions = Yes,
AllowDeletions = Yes, and AllowEdits = Yes.
I have tried all sorts of Combinations with form properties and can't seem to
find one that works. It seems I have the Edit working but when I click off
to Add a new record the whole form disappears and I get all kinds of Error
Messages.
I read several of the posts regarding the Edit / Add and can't seem to find
code that suits my need.
I have the following code (below) On_Click to Check and Add a New Record.
It's the Edit Command that I can't seem to get.
Private Sub Command124_Click()
Dim blnMissingData As Boolean
If IsNull(Me.DateRecvd) Then
MsgBox "Date Received is Blank"
Cancel = True
Me.DateRecvd.SetFocus
Exit Sub
End If
If IsNull(Me.CODEID) Then
MsgBox "CODEID is Blank"
Cancel = True
Me.CODEID.SetFocus
Exit Sub
End If
If IsNull(Me.PRGMMGR) And IsNull(Me.Check16) Then
MsgBox "Question #1 is Blank"
Cancel = True
Me.PRGMMGR.SetFocus
Exit Sub
End If
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToRecord , , acNewRec
Me.DateRecvd.SetFocus
End Sub
I want to add an Edit Command Button.
The Form Properties are set to DataEntry = Yes , and AllowAdditions = Yes,
AllowDeletions = Yes, and AllowEdits = Yes.
I have tried all sorts of Combinations with form properties and can't seem to
find one that works. It seems I have the Edit working but when I click off
to Add a new record the whole form disappears and I get all kinds of Error
Messages.
I read several of the posts regarding the Edit / Add and can't seem to find
code that suits my need.
I have the following code (below) On_Click to Check and Add a New Record.
It's the Edit Command that I can't seem to get.
Private Sub Command124_Click()
Dim blnMissingData As Boolean
If IsNull(Me.DateRecvd) Then
MsgBox "Date Received is Blank"
Cancel = True
Me.DateRecvd.SetFocus
Exit Sub
End If
If IsNull(Me.CODEID) Then
MsgBox "CODEID is Blank"
Cancel = True
Me.CODEID.SetFocus
Exit Sub
End If
If IsNull(Me.PRGMMGR) And IsNull(Me.Check16) Then
MsgBox "Question #1 is Blank"
Cancel = True
Me.PRGMMGR.SetFocus
Exit Sub
End If
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToRecord , , acNewRec
Me.DateRecvd.SetFocus
End Sub