A
avandorpe
Let me start with I have slim to no experience coding.
I am working in Access 2003, VBA.
I have a MsgBox that allows the user to indicate whether they want to
add a new record. The form (whether they intend to add or edit) opens
read only. I need to allow an add if that's what they choose while
still protecting the rest of the data once they are in. I've tried the
following code with no luck.
DoCmd.OpenForm "frmAccountEntry", acNormal, , , acReadOnly
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
I've tried adding a line of code before the Me.AllowAdditions line that
sets the focus to the form but that doesn't seem to work either. I know
what I am trying to do but not sure if it is even possible. Can anyone
give me some either help with my code or let me know if I am chasing
something that is illogical?
Thanks in advance for any assistance you can lend.
-Amy
I am working in Access 2003, VBA.
I have a MsgBox that allows the user to indicate whether they want to
add a new record. The form (whether they intend to add or edit) opens
read only. I need to allow an add if that's what they choose while
still protecting the rest of the data once they are in. I've tried the
following code with no luck.
DoCmd.OpenForm "frmAccountEntry", acNormal, , , acReadOnly
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
I've tried adding a line of code before the Me.AllowAdditions line that
sets the focus to the form but that doesn't seem to work either. I know
what I am trying to do but not sure if it is even possible. Can anyone
give me some either help with my code or let me know if I am chasing
something that is illogical?
Thanks in advance for any assistance you can lend.
-Amy