Auto-number not working on front end

S

schauser

Thank you for any assistance.

I have an Access Database that I have split into a front end and a back end
(using Access 2007). I have attempted to move the back end to SQL 2005 and
continue to use the Access as the front end. In moving the data to SQL it
appears that my auto number fields were not generating an auto number in SQL.
I figured out how to fix this problem. Now my attention has moved to another
problem:

• SQL generates the auto number after the new record is complete; Access
generates the auto number before the record is complete
• My Access front end has command buttons that are based on the auto number
field

How do I get my front end application to recognize the auto number field if
it is not generated until the record is complete?
 
J

Jeff Boyce

One approach would be to modify your Access routines to "wait" until the new
record ID ("autonumber") has been created.

Another approach would be to force SQLServer to save a new record, then grab
the ID from that new record to use in your (front-end) routine.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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