F
Freida
I have a form where the user puts information into a form that populates the
the tables. It almost works. The only trouble I am having is when a user
wants to modify a field. I used the following code
Private Sub SOURCE_CODE_Click()
If Not (IsNull(Forms![Allocation-AP].[Source_Code])) Then
If MsgBox("Do you want to modify this Record?", vbYesNo, "Modify Record?")
= vbYes Then
DoCmd.RepaintObject acForm, "Allocation-AP"
DoCmd.RunCommand acCmdRefresh
DoCmd.OpenQuery "Modify existing data", acViewNormal, acEdit
Else
DoCmd.RunCommand acCmdUndo
End If
End If
End Sub
This works fine, except for when I go to create a new record, then I get the
box asking me if I want to modify the data. But I am not sure how to fix
this. Any help would be greatly appreciated
the tables. It almost works. The only trouble I am having is when a user
wants to modify a field. I used the following code
Private Sub SOURCE_CODE_Click()
If Not (IsNull(Forms![Allocation-AP].[Source_Code])) Then
If MsgBox("Do you want to modify this Record?", vbYesNo, "Modify Record?")
= vbYes Then
DoCmd.RepaintObject acForm, "Allocation-AP"
DoCmd.RunCommand acCmdRefresh
DoCmd.OpenQuery "Modify existing data", acViewNormal, acEdit
Else
DoCmd.RunCommand acCmdUndo
End If
End If
End Sub
This works fine, except for when I go to create a new record, then I get the
box asking me if I want to modify the data. But I am not sure how to fix
this. Any help would be greatly appreciated