473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Auto Number Module for Query

How do I get the number to start at 1 and not 0?

Option Compare Database

' Declaration section
Public AutoNumber As Long

Function SeqAutoNumber(i As Variant) As Variant

SeqAutoNumber = AutoNumber
AutoNumber = AutoNumber + 1

End Function
Sep 19 '16 #1
0 779

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Geoff Cayzer | last post by:
At http://www.blueclaw-db.com/tips_tricks.htm I came across a section which is included below and was hoping for some comment on the article. -------------- Almost never use this auto-number...
4
by: Shahar | last post by:
Hi I need to get a field name 'ID'(that is an auto-number field) right after I add a new row to table, it's work like that: myCommand.ExecuteNonQuery(); myCommand.CommandText = "SELECT...
8
by: John | last post by:
Hi I need a auto-number field but with a letter prefix like "P1", "P2" etc. What is the way to achieve this? Is it possible to do this at table level? Thanks Regards
4
by: John | last post by:
Hi I am using a query to insert a record into a table that has a auto number ID field. I need to retrieve this ID so I can link the child records with it. How can I achieve that?
1
by: paulys72 | last post by:
I have a form which allocates an "auto number" to each new record. I would like to know how I can enter the form and browse through old/existing records without having to press escape to bypass the...
3
by: Wayne L | last post by:
Ok now everyone has mentioned not to use auto number if it means anything to the user. My application uses the auto number for exporting only. I append the mastertbl column with my starting number of...
1
by: Octo Siburian | last post by:
I have been collecting data from ms.access database into a class object '_Get and put in data from database Fingerprint(RAS) into CPresensiFingerprint Public Function GetdbFingerprint() As...
1
by: CodingSource | last post by:
Dear fellow programmers, I am coping with this problem for 6 days already and nearly gonna give up. All I want is when I click the 'Save' button it will add to the database and datagridview. This...
2
by: aljubury | last post by:
hi I have an access database and I have a queries but which varies monthly, the thing that I need to add a sequence number column that every time the data is changing it stays as an auto number...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.