473,385 Members | 1,582 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,385 software developers and data experts.

Auto Numbering - Help!

MJ
No one answered my original e-mail--it probably wasn't clear. I am
hoping this makes the question a little clearer.

Is it possible to combine both letters and numbers in an auto number?
I can't make it work past 9--when it comes to 10 it doesn't work. Here
is what I am using for format:
"SP-"&

It numbers SP-01, SP-02, etc. until it should show SP-10, but all I get
is: 1SP-0; 1SP-1; 1SP-2. Any ideas on
how I can get it to keep the 1 and zero together on 10?

Nov 13 '05 #1
6 1622
MJ wrote:
Is it possible to combine both letters and numbers in an auto number?
No.
"SP-"&

It numbers SP-01, SP-02, etc. until it should show SP-10, but all I get
is: 1SP-0; 1SP-1; 1SP-2. Any ideas on
how I can get it to keep the 1 and zero together on 10?


You can display what you want, an autonumber cannot be edited anyway. So
if you want to display the string "SP-" in front of the autonumber, have
a control with that as its controlsource:
="SP-" & yourautonumberfieldname

Be sure to give the *control* a name other than the *field* otherwise
Access gets confused.
--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #2
MJ
You are wonderful!!!! I just tried it and it works. Thank you so much
for taking the time to answer. Merry Christmas!

Nov 13 '05 #3
MJ

Now my problem is that if the primary key is auto numbering in one
table I can't use it as a foreign number in another table so I can
relate them. Access doesn't allow two fields to be auto number. Do
you know of a way around that?

Nov 13 '05 #4
MJ wrote:
Now my problem is that if the primary key is auto numbering in one
table I can't use it as a foreign number in another table so I can
relate them. Access doesn't allow two fields to be auto number. Do
you know of a way around that?


I don't think you want to go around that. In the other table I expect
you have another field that should be in the primary key too, otherwise
there is little point in having two tables.

What are the tables about?

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Nov 13 '05 #5
MJ
One table has Customer Information on it and one has to do with visits
to customers. When I add a new customer or if there was a new visit to
a customer, I didn't want to have to figure out what number to assign
to either table--I thought auto numbering would be the key.

Nov 13 '05 #6
MJ wrote:
One table has Customer Information on it and one has to do with visits
to customers. When I add a new customer or if there was a new visit
to a customer, I didn't want to have to figure out what number to
assign to either table--I thought auto numbering would be the key.


Both tables can have AutoNumbers as the PK. But you cannot use those to relate
the tables to each other. You need a separate long integer in the Visits table
that is related to the AutoNumber in Customers.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Steven Burn | last post by:
I'm curious, I've written a very simple PIS (personal info store) that allows one to store whatever they wish..... the problem is, when one deletes an entry, the auto-numbering isn't corrected to...
5
by: Charles McCaffery | last post by:
I have written a database with auto-numbering and now wish to remove alkl of my test data and set the auto-numbering back to one. How do I do this please? Charles McCaffery.
0
by: MJ | last post by:
I am setting up a database and want my auto numbering on a table to include letters. It works find until I hit 10 then it puts the 1 before the letters. Here is what I am using for format: ...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
3
by: Chris | last post by:
Before I started to create table, etc to track unique form field record number assigments I thought I'd check to see if there is now a better way to do this in .NET. I have a parent form (table)...
2
by: bubblegirl | last post by:
Hi, I need help in getting this database to work well (user-friendly) by generating auto client ID. The ID is NOT the auto number that Access automatically create when there is no primary key. ...
6
by: orit | last post by:
I have a word document that contains a table. The table has 2 columns and hundreds of rows. I want to number the items in the table in the following way: In the first column, each cell will contain...
0
by: jimratajski | last post by:
Can anyone tell me how to automate page numbering of spawned page templates in Acrobat? I have a number of forms containing hidden page templates that I would like to be auto numbered as they are...
1
by: arielepakz83 | last post by:
hai.. can u help me? i want to know how to make numbering auto using asp
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.