Automatically Numbering Records

I'm new to MS Access.

I need help to automatically number a field sequentially without using
AutoNumber. The format of the numbering is four digits “0000”. 
And "9999" maximum is more than enough.  

If possible provide step-by-step directions. 

Thank You

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/200708/1

0
CCHD
8/10/2007 7:11:52 PM
access 16762 articles. 3 followers. Follow

2 Replies
445 Views

Similar Articles

[PageSpeed] 27

You can use the DMax Function to retrieve the largest last used number from 
this field in your table and use that value (+1, of course) as your next 
value when you create a new record.

You want step-by-step directions, but that is virtually impossible without 
reference to the actual environment in which you are operating.

You could, for example, place this in the Before_Insert Event of the form 
through which new records are inserted into the database.

Me.txtYourAutoNumberField = Dmax("YourAutoNumberField", "tblYourTable")+1

HTH

George

"CCHD via AccessMonster.com" <u36225@uwe> wrote in message 
news:767fc83f286c2@uwe...
> I'm new to MS Access.
>
> I need help to automatically number a field sequentially without using
> AutoNumber. The format of the numbering is four digits "0000".
> And "9999" maximum is more than enough.
>
> If possible provide step-by-step directions.
>
> Thank You
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access/200708/1
> 


0
George
8/10/2007 7:42:32 PM
George

When in refer to "YourAutoNumberField", do you mean the actual AutoNumber
field?

Thanks

George Hepworth wrote:
>You can use the DMax Function to retrieve the largest last used number from 
>this field in your table and use that value (+1, of course) as your next 
>value when you create a new record.
>
>You want step-by-step directions, but that is virtually impossible without 
>reference to the actual environment in which you are operating.
>
>You could, for example, place this in the Before_Insert Event of the form 
>through which new records are inserted into the database.
>
>Me.txtYourAutoNumberField = Dmax("YourAutoNumberField", "tblYourTable")+1
>
>HTH
>
>George
>
>> I'm new to MS Access.
>>
>[quoted text clipped - 5 lines]
>>
>> Thank You

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/200708/1

0
CCHD
8/10/2007 10:55:34 PM
Reply:

Similar Artilces:

Inventory Items and Serial Numbers
I am trying to create a new inventory item that I want to track serial numbers for but the 'track' option is disabled.... What did I miss? Is Inventory registered? I think that if you don't have IV registered then you can create items but functionality past that is probably disabled. patrick mbs dev support -- This posting is provided "AS IS" with no warranties, and confers no rights. "GPS Consultant" <gpsconsultant@discussions.microsoft.com> wrote in message news:90BFC957-58F3-4E11-9D8A-615BA3311012@microsoft.com... > I am trying to create a n...

Search by Case ID or Order Number
Hi all, Seasons greetings. We use CRM Case ID as Job/Order number in our accounting system. When supplier has any queries regarding specific (accounting system) order number, we can't go to Case or Order view and use the search field at the top there. I managed to find the CRM Case or Order using Advanced Find. But it takes time. Does CRM have or intend to add search by Case or Order id, so we can find them quickly just like locating Accounts or Contacts? Thanks. Tony you can try to use a Saved View "Tony" <Tony@discussions.microsoft.com> wrote in message news...

Count records based on combo box value
Hi I have a continuous form set up that stores person details name, DoB, gender etc. Gender is a combo box which stores either a 1 or 0. I have two fields in the footer of the form which I would like to use to Count the number of males (1's) and females (0's) in the form. At the moment it contains =Count([Gender]) which of course returns a count of all the records. Can someone tell me what syntax I should be using for each field to separate the count of males/females?CountIf or something similar? Hi Dave, There are a couple of ways to get the counts of M/F. Since males = 1, to...

Increase number in table by 1
Is it possible to add a record into the middle of a table and have a column with numbers that automatically increase by one after the new entry. For example: Test1 1 Test2 2 Test5 3 Test3 3 increase by 1 Test4 4 increase by 1 Thanks! Technically no for a few reasons. 1. There isn't a 'middle' of a table. If you add records in a certain order in a table, there's now guarentee that the next time that you open a table that the records will be in the same order. 2. Access doesn't have table triggers or any other way to incremen...

Help to create and Insert New Target Date record in Subform
I am a newbie to programming in MSAccess. (I'm using Access2007). I have a mainform (ContentAreas) and a subform (UpdateDates). I also have a database table (DateSchedule). The Mainform contains a field: UpdateFrequency The Subform contains two fields: TargetDate and ActualDate The DateSchedule table is a list of dates and a "Usable" Yes/No field (to tell me if that date is a valid date for use) What I would like to do is when I update the "ActualDate" in the subform, I would like to calculate the next "TargetDate" by adding the "Update...

report -> price history source & 3-decimal numbers
installed money 2003 standard this last april2003. got all investments setup in price history report with [date] as [year-to-date]. rows/columns set with source fields picked. a black dot shows up at each buy date EXCEPT buy dates AFTER the original money install date. what is happening here?.....how to get dots to appear after install date.? transactions activity are listed as [add shares] on 1/2/2003 and [buy] on monthly buy dates. also on the [home] page the share prices in best/worst performers & summary lists are shown in 3-decimal places. how to change these to 2-d...

copy reference number
I have created a large spreadsheet Some 30000 Items I wsh to add a field for MYREference number at the end of each line for example badtimes1 then I would like to be able to automatically copy badtimes1 all the way down to badtimes3000o with a copy/Formula I am not ure how how to do this Any help would be most appreciated Assume text runs in A1 down place in B1: =TRIM(A1)&TEXT(COUNTIF($A$1:A1,A1),"000") Copy down as far as required -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "eventhebadtimesaregood" wrote: > I have created a large...

How do I bind a minus sign to a number to remain on same line?
I want to bind a minus sign to a number so that the entire construct remains on the same line and not split between two lines (e.g., -21% on same line versus - on one line and 21% on next line). Thanks, Drew Baughman You use a Non-Breaking-Hyphen. Press Ctrl+Shft+Hyphen to create. Hope this helps DeanH "baugd" wrote: > I want to bind a minus sign to a number so that the entire construct remains > on the same line and not split between two lines (e.g., -21% on same line > versus - on one line and 21% on next line). > > Thanks, > Drew Baugh...

separate data and change text to number
Here's my problem. Column A named Store, Column B Job. Some of the cells in column A have two stores. I need to separate the stores and put them all in one column underneath each other. The column needs to be formated as number. Store Job Store Job 378 & 349 Sign Package 370 & 383 Sign Package 362 & 368 Sign Package 357 & 367 Sign Package 352 & 359 Arrow Refresh& sign Package 352 & 359 Arrow Refresh& sign Package 8528 sign package 8519 Arrow Refresh& sign package 8472 sign package 8446 sign package 8439 sign package 8437 sign packa...

Embedded excel charts resize automatically
In my reports created in publisher I usually embed excel chart objects so I can edit the data directly from publisher and use the reports and charts over and over. In many instances, when I double click the chart to edit it, it expands and distorts forcing me to re-size and reformat the text to the original size. Is there any way to keep this from happening? Thanks ...

Mail won't automatically forward from outlook 2000 to another email account not on exchange server
> This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --B_3193857361_3699260 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit I have tried several times using rules wizard on outlook 2000 to have my mail forwarded automatically to no avail. I am in a small office running exchange 2002 I would like to have all incoming mail to an IMAP server account. Any suggestions? --B_3193857361_3699260 Content-type: text/html; charset="US-ASCII" Content-transfer-enc...

Wrong record being updated
In Access 2000. I have a table with three records. Some of the fields are RMAKey, RMANo, SerialNo. and Shop order No. WHen I open the form I get a listbox listing these fields in RMANo order. The RMAKey is hidden. It is the key to the table (Indexed, No duplicates). I can click on any of the entries and get a new screen with the details for the RMA. If I click on the RMANo = 2 or RMANo = 3(Not RMANo = 1), I get the correct detail screen. But when I click on "Return No Save" a menu I created, the code goes to the correct function which has the following like of code ...

Edit, Delete command buttons next to each record
Hi there, I have a form, with a subform showing records from a table. Would it be possible to put command buttons next to each record, without having to hard-code a set number of cmd buttons, and showing on scrollable data within this subform? Furthermore, when clicking the Edit cmd button, it should open another form and populate this with the selected record... how can I achieve this? Thank you kindly! -- The Psyber Fox http://www.psyberconsulting.co.za ...

Workflow or JScript for automatic/lookup address in appointment
Dear readers, Does anyone have experience with a workflow or JScript (OnLoad) to write the location in the address/location field in the appointment? Thanks in advance for helping me. Hi Sjoerd, Yes of Course , can you tell me exactly what you want to do , so i'll be able to help you better? -- Regards, Karim Mohamed http://karimmohamed.spaces.live.com "Sjoerd" wrote: > Dear readers, > > Does anyone have experience with a workflow or JScript (OnLoad) to write the > location in the address/location field in the appointment? > > Thanks in advance ...

Automatically acknowledge task updates ?
Hi, is there a way to automatically acknowledge task updates? I did move the message to somewhere using rules but this didn't update the task itself. Background: I create a new task and assign it to someone. He accepts the task, I get a new mail stating that fact. Opening and closing that mail updates the corresponding task and removes the mail from my inbox. This is the first mail I would like to proceed automatically. At some point in the future my teammate finishes the task, which results in 2 mails in my inbox, one 'updated' and one 'completed'. At least the ...

Include project number in transaction data that posts to G/L.
This would allow detailed schedules & reports of account balances. We have spent a lot of money to have reports created so we can see how much unbilled A/R we have per project. Same for deferred revenue, revenue, invoiced, etc. And because we use multiple ways of booking revenue (T&M, Fixed Fee, etc.), none of the reports are completely reliable. If every item that was posted to the G/L associated with a project carried that project number to the G/L, creating reports we need would be much, much easier, and make reconciling to the G/L an easier process. From our standpoint,...

page numbers not showing
I have a twenty page paper with a border. Upon printing, the page numbers are being cut off as is the bottom and top borders. Also pages that have the top/first line as bold, the top of the letters are being cut off. I have adjusted page setup and print setup but then have viewed print preview and that shows the same problem with cutoffs on top and bottom of the page. Any suggestions? -- Frankly Speaking Frankly Speaking wrote: > I have a twenty page paper with a border. Upon printing, the page > numbers are being cut off as is the bottom and top borders. Also > pages that have...

related records in advanced find doesn't work
Hello, I have an advanced find where I am trying to bring in some information from the 'related to' lead on an appointment. No matter what lead field I select, no data is returned for that column. Has anyone seen this behavior or had any issues with this? Thanks! The 'related to' fields work as a seach filter criteria so you are specifying here which records to include in your search. The 'edit columns' option dictate the data columns visibly returned from the query. Regards Marion "jpop" wrote: > Hello, > > I have an advanced find w...

deleting page numbers
I have accidentally inserted page numbers on the center bottom of a page as well as in the upper right corner. How do I get rid of the center bottom page numbers? Double-click in the footer area at the bottom of the page to activate it. Click on the page number to select it, and press Delete. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. johmont wrote: > I have accidentally inserted page numbers on the center bottom of a > page as well as i...

Counting groups of exact case numbers w/letters in them.
I need to know how I can write a formula to count a very big list of numbers and return the total number of numbers that are different in the list. For example: CAH8800719 CAH8800718 CAH8800718 CAH8800717 FJG8800719 FJG8800715 CAH8800719 FJG8800715 As you can see there are 8 case numbers in this list but of those 8 there are only 5 different case numbers. So if I had a list of several hundred or thousand case numbers like the ones above, and many of them had duplicates somewhere in the list, how can I get excel to give me a total number of all the similar case numbers? I can use the ...

Median of column I if column A numbers match
I'm using the 2007 version of Excel. I have a worksheet with 13,000 lines of data. Column A is titled ITEM and column I is titled PRICE. I need to find the Median number of column I when the numbers in column A are the same. I have 2000 unique ITEM numbers. When the ITEM number in several rows match, I need a formula to find the Median value of the PRICE. So if A2, A3, A4 ... A20, and A21 all have the same ITEM number, then I need the formula to find the Median number of I2, I3, I4 ... I20, and I21. I've messed around with IF functions and can't seem to get...

convert number to a set multiple of that number
Is there any way that I can type in a number into a cell and have a formula multiply that number by .397 and have the result show up in the same cell? Any help will be greatly appreciated. Only by using VBA, you could get the same effect by putting 0.397 in a cell, copy it, select the cell with the number and do edit>paste special and select multiply -- Regards, Peo Sjoblom "CB" <anonymous@discussions.microsoft.com> wrote in message news:CEF48282-6C59-480E-BBB2-938E9C799802@microsoft.com... > Is there any way that I can type in a number into a cell and have a formu...

Automatic Import?
Please help!!! I've been using Money for years, and I have always been able to automatically import .ofx files directly from my bank's website. Recently, this operation has not been sucessful. When I download the OFX file, a dialog appears for a fraction of a second (much too fast to read anything), and no import is completed. My only recourse has been to download the Quicken file and do a manual import, which is very time consuming, and causes a lot of duplicate transaction entries. If there is any setting in Money or my web browser that can be tweaked to re-enable my auto download,...

Automatically Add Record to table
Hello, I have created a weekly service database, and I am trying to automatically add a record to a table. Main Table: JobID - Service End - Job is no longer on service. Service Table - Links to JobID ServiceID Date Completed y/n I want my technician to open a form that shows all service items that are not completed. as they update what has been completed and that service end is null, i would like a button that they press to add a new service record and auto fill in service date (adding 1 week) doing this manually is time consuming as we may have 100 or more services at one time tha...

Excel filter no longer calculates the number of matches
I have applied filters to an excel spreadsheet. When I select a value from the filter drop down it used to display the count or total number of records inthe filtered list in the botton right hand corner. Now, for some reason it still filters but it DOESNT display the count of records, instead it displays Filter Mode. This has happened for years but only now have I decided to ask why! Please can someone tell me what I am doing wrong! Take a look at Debra Dalgleish's site: http://www.contextures.com/xlautofilter02.html#Count She has a couple of workarounds. SReed wrote: > &g...