We help IT Professionals succeed at work.

access form - next record question

geedub1961
geedub1961 asked
on
Medium Priority
313 Views
Last Modified: 2012-05-11


How can I modify this code to NOT add a new record if I am at the end of the file?

DoCmd.GoToRecord , , acNext
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016

Commented:
you can use

DoCmd.GoToRecord , , acPrevious

or

DoCmd.GoToRecord , , acFirst
CERTIFIED EXPERT
Top Expert 2011

Commented:
The way I like to handle this is to set the form's property for Allow Additions to false.
CERTIFIED EXPERT
Top Expert 2016

Commented:
the op might be using a user define record navigation
see this similar  thread

https://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20843155.html#a10062324
Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I want to do a calculation on each of the items in my data - on the last row I want to stop the process - however it keeps adding a new rows to the bottom of the dataset.



 

Author

Commented:
What I want to happen is this

Start on row1 - calculate depreciation - move to row2 same calc and repeat process until I get to the final row and then stop the process.

So far I can start on row1 and continue - but when I get to the end of the data it adds new rows to the data.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007

Commented:
Post any code you have in the Form Current event.

mx
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.