Prevent going to New Record

P

Peter Marshall

In a form that the user can goto Next or Previous record, how do I prevent
them from going to a New record?
 
P

Peter Marshall

Actually, I saw that solution on another post, but it still allows the form
to go to a new blank record, although it does not allow that record to be
saved. I think I have seen some VBA code that prevents the form from going
to a blank new record.
 
A

Al Campagna

Peter,
What version?
I can't duplicate your problem.
A form, with Allow Additions = No, will not allow access a new record.
So there's something else going on here...

Try this...
Place an unbound text control on the form with a ControlSource of...
=IIf([newrecord],"New","Not New")

Also, what code are you using to open the form?
If you use the acFormAdd, or acFormEdit, you can override the
AllowAdditions.
Try just
DoCmd.OpenForm "YourForm"
to see if that makes any difference.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top