Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 30th, 2003, 03:16 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Reply With Quote
  #2 (permalink)  
Old September 30th, 2003, 11:36 PM
Authorized User
 
Join Date: May 2003
Location: Delhi, Delhi, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #3 (permalink)  
Old October 10th, 2003, 03:59 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoNumber in MS Access iii_carlos BOOK: Beginning VB.NET Databases 6 January 31st, 2007 08:23 PM
Autonumber in Microsoft Access ozzii Classic ASP Databases 1 January 17th, 2007 04:08 PM
Accessing AutoNumber field of MS Access Using ASP MuthuAL Classic ASP Databases 1 January 22nd, 2005 11:30 AM
Access Autonumber chall90909 Access ASP 1 November 21st, 2004 10:26 AM



All times are GMT -4. The time now is 11:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.