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 / May 2007

Tip: Looking for answers? Try searching our database.

TRYING TO CREATE AUTONUMBER FIELD

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Selee - 10 May 2007 15:53 GMT
I imported a large Approach DBF file into Access 2007.  I set up my data
entry form for the new table.  On my old Approach form we had a field
"Sample Number".  When you started the database, the input form came up.When
you click on the sample number field, a new sample number appeared which was
the previous record sample number +1.   Seems simple enough.  No validation
was required and Approach listed the field as a field box, numeric, auto
number-serial.

Ok when I bound this field to the new table field in Access, I set it up as
a numeric field box.  I tried to set it for auto number but since there were
previous entries, Access wouldn't allow it.  Anyway, I tried finding a way
to increase the last record sample number by 1.  I've set up the expression
for the control source field  many different ways but nothing works.  Can
anyone tell me how to take the [sample_no_] bound field and set it to
increment by one when someone clicks to input a new record?

Is this possible?
KARL DEWEY - 10 May 2007 16:13 GMT
>>I tried to set it for auto number but since there were previous entries,
Access wouldn't allow it.
You can copy your table structure to a new table and set the field as
Autonumber.  Do a Compact and Repair.  Then append to the new table.  You can
append numbers to the autonumber field if that number has not been inputted
earlier.
Signature

KARL DEWEY
Build a little - Test a little

> I imported a large Approach DBF file into Access 2007.  I set up my data
> entry form for the new table.  On my old Approach form we had a field
[quoted text clipped - 13 lines]
>
> Is this possible?
Selee - 10 May 2007 18:16 GMT
I did what you suggested.  It worked fine except for the fact that I wanted
to keep the existing numbers from my old DBF which start at 8090 and Access
assigned numbers starting at 1.  We wondered whether we could add another
field and put a default value of  8089 in it and then write a formula to put
in the autonumber field adding the two together.  Can this be done in an
autonumber field?

Seems a lot more complicated than it needs to be.

>>>I tried to set it for auto number but since there were previous entries,
> Access wouldn't allow it.
[quoted text clipped - 29 lines]
>>
>> Is this possible?
KARL DEWEY - 10 May 2007 20:52 GMT
You should have been able to append your old numbers into the autonumber
field.  Did they not append in?  
All new records after that should increment from your highest number.

Signature

KARL DEWEY
Build a little - Test a little

> I did what you suggested.  It worked fine except for the fact that I wanted
> to keep the existing numbers from my old DBF which start at 8090 and Access
[quoted text clipped - 38 lines]
> >>
> >> Is this possible?
Selee - 10 May 2007 21:33 GMT
No, Access renumbered them all starting with 1.  The other idea didn't work
either.  I don't know what I'm doing wrong.

> You should have been able to append your old numbers into the autonumber
> field.  Did they not append in?
[quoted text clipped - 53 lines]
>> >>
>> >> Is this possible?
Selee - 10 May 2007 21:34 GMT
I'm sorry, I forgot something.  It also did not append the next number when
you go to a new record.  In the sample no. box it just sayd  (new).

> You should have been able to append your old numbers into the autonumber
> field.  Did they not append in?
[quoted text clipped - 53 lines]
>> >>
>> >> Is this possible?
 
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



©2009 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.