TRYING TO CREATE AUTONUMBER FIELD

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?



0
Selee
5/10/2007 2:53:58 PM
access.forms 6864 articles. 2 followers. Follow

5 Replies
686 Views

Similar Articles

[PageSpeed] 11

>>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.
-- 
KARL DEWEY
Build a little - Test a little


"Selee" wrote:

> 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?
> 
> 
> 
> 
0
Utf
5/10/2007 3:13:01 PM
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.



"KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message 
news:2F0EAC87-2F1B-4B36-8669-395E699FAAD1@microsoft.com...
>>>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.
> -- 
> KARL DEWEY
> Build a little - Test a little
>
>
> "Selee" wrote:
>
>> 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?
>>
>>
>>
>> 


0
Selee
5/10/2007 5:16:27 PM
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.

-- 
KARL DEWEY
Build a little - Test a little


"Selee" wrote:

> 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.
> 
> 
> 
> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message 
> news:2F0EAC87-2F1B-4B36-8669-395E699FAAD1@microsoft.com...
> >>>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.
> > -- 
> > KARL DEWEY
> > Build a little - Test a little
> >
> >
> > "Selee" wrote:
> >
> >> 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?
> >>
> >>
> >>
> >> 
> 
> 
> 
0
Utf
5/10/2007 7:52:01 PM
No, Access renumbered them all starting with 1.  The other idea didn't work 
either.  I don't know what I'm doing wrong.


"KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message 
news:FB4A1054-3CB2-4100-B20C-36B2DDDBDF3A@microsoft.com...
> 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.
>
> -- 
> KARL DEWEY
> Build a little - Test a little
>
>
> "Selee" wrote:
>
>> 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.
>>
>>
>>
>> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
>> news:2F0EAC87-2F1B-4B36-8669-395E699FAAD1@microsoft.com...
>> >>>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.
>> > -- 
>> > KARL DEWEY
>> > Build a little - Test a little
>> >
>> >
>> > "Selee" wrote:
>> >
>> >> 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?
>> >>
>> >>
>> >>
>> >>
>>
>>
>> 


0
Selee
5/10/2007 8:33:15 PM
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).


"KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message 
news:FB4A1054-3CB2-4100-B20C-36B2DDDBDF3A@microsoft.com...
> 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.
>
> -- 
> KARL DEWEY
> Build a little - Test a little
>
>
> "Selee" wrote:
>
>> 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.
>>
>>
>>
>> "KARL DEWEY" <KARLDEWEY@discussions.microsoft.com> wrote in message
>> news:2F0EAC87-2F1B-4B36-8669-395E699FAAD1@microsoft.com...
>> >>>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.
>> > -- 
>> > KARL DEWEY
>> > Build a little - Test a little
>> >
>> >
>> > "Selee" wrote:
>> >
>> >> 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?
>> >>
>> >>
>> >>
>> >>
>>
>>
>> 


0
Selee
5/10/2007 8:34:34 PM
Reply:

Similar Artilces:

Can I use named range in data range box when creating pie chart?
I have 75 pie charts to create today. Is there a way to use named ranges in the data range box to speed this up? Yes. Just type in the name. -- George Nicholson Remove 'Junk' from return address. "BJackson" <BJackson@discussions.microsoft.com> wrote in message news:0DE9A0AD-C3BA-4242-B3BA-3CC3F0D87894@microsoft.com... >I have 75 pie charts to create today. Is there a way to use named ranges >in > the data range box to speed this up? Thank you! I was making it too difficult, thinking I needed to include the Sheet name along with the name range. ...

Try on that correction package which comes from the Microsoft Corp.
--ydtqnkeldsmk Content-Type: multipart/related; boundary="vmwghrce"; type="multipart/alternative" --vmwghrce Content-Type: multipart/alternative; boundary="rdruqpweyjfse" --rdruqpweyjfse Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Microsoft Partner this is the latest version of security update, the "October 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three newly discovered vulnerabilities. Install now to protec...

Field Validation Rule to Exclude Ampersand
I am trying to create a validation rule for a table field that will prevent the use of the ampersand character (&). InStr(1,[strClientName],"&",1)<>0 does not work. What is the correct syntax? -- Ken Hudson Try Not Like "*&*" -- Ken Snell http://www.accessmvp.com/KDSnell/ "Ken Hudson" <KenHudson@discussions.microsoft.com> wrote in message news:4325F6EB-EDEA-4380-9F0E-35CF862D9C2A@microsoft.com... >I am trying to create a validation rule for a table field that will prevent > the use of the ampers...

trying to remove phone: from the column = [phone: 4253331212]
got a full column with 500 cells that contain the name[phone:] how to I clear the {phone:] from all cells in the column? Thx Fast option: 1. Add a new column next to your existing column. For the sake of this example, I'll assume your data is in Column A, starting in cell A2 2. In the first blank cell next to your first number (B2), enter the formula: =right(A2,len(A2)-6) if that is too many or two few digits, change the value from 6 to 5 or 7 or whatever you need autofill that formula down the whole column Copy that column, then "paste special"/ values over...

Error generating the xml document when trying to access the web service
Hi There, I get this error when I try to access the web method..I can see that the objects are constructed properly before they are passed....All I am doing is this... ------------------------------------ I have these two classes in the client class as well as the web service.... public class ResponseChartImage { public int InstanceId; public int VariableId; public byte[] ImageByte; public ResponseChartImage(){} } public class RequestChartImage { public int InstanceId; public int VariableId; public RequestChartImage(){} } ------------------------------------------------...

Is there 'autonumber' in excel?
Can anyone help me? I just want something along the lines of what is available in Access to enter a new number everytime a new entry is made..... I want to hav an autonumber for orders. Sorry its such a noob question -- Message posted from http://www.ExcelForum.com Hi there is no build-in feature like autonumber in access. Some workarounds If you want your number in column A enter the following in A1: =IF(B1<>"",ROW(),"") this will create a number (the row number) if you enter something in column B. Note: This number is not attached to your data. that is if you de...

Assign Doc # When Creating SOP Returns
It would be nice to assign the document number when creating SOP returns rather than the system trying to assign the next number. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.msp...

How do I apply a template I created to an existing publication?
I want to change a publication I created to a design that I created and saved in a publisher format. I do not want to have to recreate the publication in the new format, just change it! "Publication Options" "Apply Template" brings up a list of templates that does not include the one I created and want to use. Help! Did you save the publication as a template? Save as "Publisher template". What version Publisher are you using? If you are using 2007 you will have to browse to the templates. They are in a folder similar to this (Vista) These folders are hi...

Does anyone create sites without using tables for layout?
I know that a trend is to create websites that are pure css, and don't rely on tables for layout. Are asp.net devs taking that approach also? I checked a couple of major asp.net websites like newegg.com and they do seem to use tables for layout. Any info out there focused on table-less asp.net dev? Most of us try but I think our dirty little secret is most also cop out and start using tables here and there when their pages become increasingly complex. You'll note most of the "pure" CSS sites are often little more than what we call StackPanels in XAML using CS...

Create an identical Chart Worksheet in Excel 2003
Hi: I used the F11 key to create a chart, which inserts just a chart as a new worksheet and gives it a default name, such as chart 2. My question is, can I create an identical chart as a new worksheet. This wouldn't be a copy, rather, a duplicate that is pulling information from the same location in the entire workbook. The reason I want to do this is because I currently have data for 12 different series, and each series has 7 values. What I would like to do is keep the same chart, but reduce the number of values per series from 7 to just 4. The easiest way seems to me to be to create ...

Using atachment fields in a form
Is there a way that an atachment be changed or added in a form? I have a table that uses atachments and would like to be able to change out the atachment or add an attachment while in form view. The only option that shows up in form view is "View" and not "Add" or "Edit". The only place that add or edit shows up is in table view. 2nd question is can the path for attachments be made relative so the database can be used on different computers? Thanks ...

Help with Ask fields in Word 2007
I have a word template that I have created. I am going to be distributing this document internationally and don't want to have to manage change controls on multiple documents. Since we decided against using an Infopath form via forms services I had to scale back on the functionality in a few areas such as repeating rows and fields. That being said, I can't figure out how to accomplish something that should be rather simple. I need to ask the user to enter their region when the form template is first opened, display it in the footer. I can't figure out how to on...

Format a Date Using Field Properties
I know how to do this in Visual Basic and Assembler but having trouble with the Syntax in Access On the Format Event on the Properties Menu for a Field I have ("mm/d/yy") I have been guessing and trying to find an example on the WEB and in Access Help and still cannot determine what I am doing wrong. All I want to do is display the year as two characters instead of four! On my Format Tab, On the Format Line (The first line) What Syntax does it want to do this very simple task! Thanks in Advance Len mm/d/yy (no quotes) -- Doug Steele, Microsoft Access MVP http://I.Am/Do...

Including field names in RTF Report filename
How do I include field names in the filename of a report that gets output to an RTF file? Have a confirmation report that's sent as RTF via email attachment and want the individual's first/last name to automatically be included in the report's file name. Base report is named Confirmation Email, when I use a button/OnOpen event to do: Dim stDocName As String stDocName = Me![lastname] & "Confirmation Email" DoCmd.OpenReport stDocName, acPreview, , "[id]=" & [id] It gets the last name (i.e., Smith Confirmation Email) in the filename, but I get ...

How to create an order with products using workflow
It appears that using Workflow we can create a new Order record, but there does not appear to be any way to add Products to that Order once it has been created. Does anyone know how to do this? Hi, This will require custom development. -- uMar Khan :: MS CRM MVP CRM Freelance Consultant Email :: imumar at gmail dot com Blog :: http://umarkhan.wordpress.com MVP :: https://mvp.support.microsoft.com/default.aspx/profile/umar.khan "Bevan Edwards" wrote: > It appears that using Workflow we can create a new Order record, but there > does not appear to be any way to add Prod...

Create unique list from duplicates
The solution for this is probably a quite simple array formula wit COUNTIF, but I cannot seem to get it exactly right. All I want to d is take a list with many duplicates and list each duplicate once, in separate list, without modifying the first list. For example: Column 1 1 2 8 5 9 8 5 4 8 would generate: Column 2 1 2 8 5 9 4 Thanks in advance, Stephani -- Message posted from http://www.ExcelForum.com Hi Stephanie, What you are looking for, I believe, is Data > Filter > Advanced Filter. Select "Copy to another location" then click the "Unique records only&qu...

how to create a clustered, 100% stacked combination chart
I want to create a chart with 2 100% stacked columns to compare % of 2 different years. Hi, Maybe you can use the information here but using 100% stacked columns. http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html Cheers Andy Keri in Vermont wrote: > I want to create a chart with 2 100% stacked columns to compare % of 2 > different years. -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Outlook 2003 (Creating new email)
I have been creating new email for several months now using Outlook 2003. While I was creating some new rules for emails, I must have changed a setting. Now when I attempt to create a new email, it pulls up a template with wierd fonts, some of my typing doesn't show up on my screen as I am inputting, my signature I had created doesn't show up, and it has a different feel than the before? Any idea what I have done and what I should do to restore my previous settings? ...

Creating custom fields in shema manager
Hey, I am pretty new to MS CRM and I am trying to add a field to the pricelist. I have been looking at the schema manager, but I am unable to add a field. When I right-click on on the attributes, I choose 'New', but 'Schema field' is greyed-out, so I can't click on that. Somebody knows what wrong or how I can fix that ? Something I forgot ? Any help would be appreciated. thx BB ...

How to I create a tax export that is eariler than last year.
For example itss 2009, when I try to create a tax export report (.txf) I'm only given options for 2008 or 2009 (partial). How do I create a tax export for 2007? In microsoft.public.money, bmwbiker wrote: >For example itss 2009, when I try to create a tax export report (.txf) I'm >only given options for 2008 or 2009 (partial). How do I create a tax export >for 2007? Try closing Money, and setting your computer clock back to a date in 2008. You may have to disconnect from the internet, but probably not. Start Money again, and generate your .txf file. ...

Macro Creating
I have tried and tried to create a MACRO in Excel that will will delete a row. I have read several other marcos but have been unable to translate them to what I want to do. Listed below a sample of the type data I am talking about. What I want to do is have the macro read the second number in the colum and everytime it read a 0 it deletes that whole line of information. This type table will have some blank row but I do not want to delete. Can anyone help. Thanks in advance. Ron D60801 0 0 0 0 0 D78555 0 0 0 0 0 E98103 0 0 0 0 0 N04456 0 0 0 0 0 N05482 3 60 0 0 0 N95862 0 0 0 0 0 N96248 3 ...

Creating a Distribution List in OUTLOOK 2007
Hello, Is there a way to create a DISTRIBUTION LIST in OUTLOOK 2007 that contains contacts with a specific feature WITHOUT adding members one by one? E.g., I need a distribution list of all contacts whose e-mail address is in a particular domain. The following sequence DOES NOT work: CONTACTS ---> ACTIONS ---> NEW DISTRIBUTION LIST ---> SELECT MEMBERS ----> SEARCH (MORE COLUMNS) When I entered the domain name in the search window, I got no results. Thus, OUTLOOK did not search the entries of the e-mail addresses. Thank you for your help. ATK "...

how can I save a publisher created logo in picture format?
I've created a logo in MS Publisher. How can I save the logo in picture format so that it can be inserted into other programs? GEL <GEL@discussions.microsoft.com> was very recently heard to utter: > I've created a logo in MS Publisher. How can I save the logo in > picture format so that it can be inserted into other programs? What version of Publisher are you using? -- Ed Bennett - MVP Microsoft Publisher "Ed Bennett" wrote: > GEL <GEL@discussions.microsoft.com> was very recently heard to utter: > > I've created a logo in MS Publ...

Lead Lookup field
Is there a way to tie a Lead to another Lead? We receive lists that we would like to import into Leads, but would like to separate them out into a Parent Lead(lead lookup field) and Sub-Leads basically. From what I can see, there isn't a way out of the box to do this? I see the Customer look-up field that can be added to the form, but it is only for Accounts and Contacts. Any help would be appreciated. Thanks!! Hi, MS CRM dont support relationship between system entities. so you cannt have Lead's lookup in Lead's form as parent Lead but you may define a new custom enti...

i need to create a chart from data from one workbook in another wo
hi new to excell so please be kind. i need to create a series of charts from different sets of data in one workbook, and have the charts show in another seperate workbook, and update automaticly when the data changes in the first workbook. i know how to create charts, its just that i can't get it linking from one workbook to another please help Mark Hi, An easy approach would be: Make the charts in the workbook containing the data. Cut and paste those charts into a new workbook. The charts are still linked to the original workbook. If you make changes in the data, the charts...