Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

Autonumber in a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tyler - 12 Mar 2007 15:35 GMT
I have a form that allows data entry and additions only.  What I would
like to do is have the record number pop up in a field on the form.

Im not sure how to write the code for the event procedure to be able
to do this.  What would be convienient is that the number would pop up
as soon as the form is opened.

any suggestions?
Jeff Boyce - 12 Mar 2007 15:58 GMT
Tyler

Perhaps you and I have a different understanding of "Autonumber"...

The Access Autonumber is a system-generated unique key value, whose only
(OK, whose primary) use is as a unique row identifier.  Since you have no
control over the value Access comes up with (and there can be 'gaps' in the
sequence, causing severe heartburn for auditors), you're best not even
showing the user the value (i.e., they are generally unfit for human
consumption).

Also, if your data is in an Access (i.e., JET) back-end, the "next"
Autonumber is assigned when the new record is first "dirtied" (i.e., data
added to it).  However, if your back-end/data is in SQL-Server, SQL-Server
does not assign an autonumber-equivalent until AFTER you save the record.

?More than you needed to know?

Signature

Regards

Jeff Boyce
Microsoft Office/Access MVP

>I have a form that allows data entry and additions only.  What I would
> like to do is have the record number pop up in a field on the form.
[quoted text clipped - 4 lines]
>
> any suggestions?
Tyler - 12 Mar 2007 16:18 GMT
Well actually here's the "real" problem.

For the current file system in place the coding goes as such "CI YY/
000"  YY being the last two digits of the current year and 000 being
the three digit area where numbers can be inputed.

I've created a mask that forces the user to type in two letters (CI) a
space and the current year but the user doesn't know which record it
is which is why i wanted the autonumber to pop up.  This would enable
the user to input CI 07/001 for the first record and continue this
way.  When the autonumber is 10 then the user would see the 10 and
enter CI 07/010.

I think im probably making this more complicated than it needs to be.
What would be best is if I could get this all automated but I have no
idea how to do this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.