 |
| Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 30th, 2003, 03:16 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP and Access AutoNumber
Hi All,
I have an Access database with an AutoNumber field. Now instead of having the number starts off with 1, can I have the format to be something like: B03-001, B03-002, B03-003, and so on.
I have been looking all over the place to do something like this, but so far no luck. What I am working on is an ASP page where I input a customer purchase information. Each time I enter a new customer, the database will automatically (AutoNumber) that particular record. Now the catch is, I want that AutoNumber to start with what I want it to be, instead of 1 and increment. Please Help! If this is not the right place to ask such question, please refer me to an appropriate site. Greatly Appreciated!!! Thank you!!!
Leon
|
|

September 30th, 2003, 11:36 PM
|
|
Authorized User
|
|
Join Date: May 2003
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Leon,
In the table design view set the format of AutoNumber field as
B03-000.
Bye.
Quote:
quote:Originally posted by phungleon
Hi All,
I have an Access database with an AutoNumber field. Now instead of having the number starts off with 1, can I have the format to be something like: B03-001, B03-002, B03-003, and so on.
I have been looking all over the place to do something like this, but so far no luck. What I am working on is an ASP page where I input a customer purchase information. Each time I enter a new customer, the database will automatically (AutoNumber) that particular record. Now the catch is, I want that AutoNumber to start with what I want it to be, instead of 1 and increment. Please Help! If this is not the right place to ask such question, please refer me to an appropriate site. Greatly Appreciated!!! Thank you!!!
Leon
|
Deepesh Jain
VB,VBA & .NET Specialist
Wiley Support Team
|
|

October 10th, 2003, 03:59 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you very much for you help. Wow, that was easy. I have another question and was wondering if you could please help me; it is related to the AutoNumber field as well.
I created an ASP page to UPDATE a record. Please see the Update string below. The problem is, when I click on the update button, instead of updating that record I have set on, it creates a brand new record in the database. Please note, the "referencenumber" is the autonumber field. What am I doing wrong? Thanks again.
SQLstmt = "UPDATE classificationmain SET "
SQLstmt = SQLstmt & "lastname='" & lastname& "',"
SQLstmt = SQLstmt & "incumbentname='" & incumbent & "'"
SQLStmt = SQLStmt & " where referencenumber= " & referencenumber & ""
Quote:
quote:Originally posted by Deepesh_Jain
Hi Leon,
In the table design view set the format of AutoNumber field as
B03-000.
Bye.
Quote:
quote:Originally posted by phungleon
Hi All,
I have an Access database with an AutoNumber field. Now instead of having the number starts off with 1, can I have the format to be something like: B03-001, B03-002, B03-003, and so on.
I have been looking all over the place to do something like this, but so far no luck. What I am working on is an ASP page where I input a customer purchase information. Each time I enter a new customer, the database will automatically (AutoNumber) that particular record. Now the catch is, I want that AutoNumber to start with what I want it to be, instead of 1 and increment. Please Help! If this is not the right place to ask such question, please refer me to an appropriate site. Greatly Appreciated!!! Thank you!!!
Leon
|
Deepesh Jain
VB,VBA & .NET Specialist
Wiley Support Team
|
|
|
 |