PC Review


Reply
Thread Tools Rate Thread

Autonumber in ID

 
 
=?Utf-8?B?YW5kcmV3MzI1NA==?=
Guest
Posts: n/a
 
      18th Jul 2007
Hi, I might be missing something stupid here but...

Is it possible to have 3 field keys,

What I got is Customer ID, Department reference, autonumber and i want
something like:

342 - ELEC - 1
342 - ELEC - 2

343 - ELEC - 1

etc. Is there a way of getting the autonumber to reset for each customer id?
--
Thank you


 
Reply With Quote
 
 
 
 
Joseph Meehan
Guest
Posts: n/a
 
      18th Jul 2007
andrew3254 wrote:
> Hi, I might be missing something stupid here but...
>
> Is it possible to have 3 field keys,
>
> What I got is Customer ID, Department reference, autonumber and i want
> something like:
>
> 342 - ELEC - 1
> 342 - ELEC - 2
>
> 343 - ELEC - 1
>
> etc. Is there a way of getting the autonumber to reset for each
> customer id?


Auto numbers are designed to provide unique numbers. They usually show
up as consecutive numbers. That tends to confuse people into thinking they
are consecutive numbers. Sorry they are not. They are best not seen by
humans. :-)

There are ways of doing what you want, but it will require writing your
own code for it. Hopefully someone will post a code for you that will help
you get what you want.

BTW does the center "ELEC" ever change? if not it should not be stored
in the table. It looks like what you have are three different types of
data. Normally they should not be stored in the same field.

If you can tell us more about what each part means and what use will be
made of it maybe we can make some more specific suggestions.

--
Joseph Meehan

Dia 's Muire duit




 
Reply With Quote
 
=?Utf-8?B?YW5kcmV3MzI1NA==?=
Guest
Posts: n/a
 
      18th Jul 2007
Customer ID is a foreign key linked to a customers table, this is in text
format as there is no need for calculations on it.

Department reference is simply an abbreviation of that deaprtment, a text
value also. There are different departments but these have different tables
for each department.

The last section is a sequential number I want to help group record by
customer, and department

e.g. if it is the first customer in the department for electrical say

101 - ELEC - 1 and if they have another transaction that will be 101 - ELEC
- 2.

and if another customer has a transaction it works on the same basis
102-Elec-1 etc.

I have tried using DCount but that doesnt seem to work, it just seems to
total up ll the records.
--
Thank you




"Joseph Meehan" wrote:

> andrew3254 wrote:
> > Hi, I might be missing something stupid here but...
> >
> > Is it possible to have 3 field keys,
> >
> > What I got is Customer ID, Department reference, autonumber and i want
> > something like:
> >
> > 342 - ELEC - 1
> > 342 - ELEC - 2
> >
> > 343 - ELEC - 1
> >
> > etc. Is there a way of getting the autonumber to reset for each
> > customer id?

>
> Auto numbers are designed to provide unique numbers. They usually show
> up as consecutive numbers. That tends to confuse people into thinking they
> are consecutive numbers. Sorry they are not. They are best not seen by
> humans. :-)
>
> There are ways of doing what you want, but it will require writing your
> own code for it. Hopefully someone will post a code for you that will help
> you get what you want.
>
> BTW does the center "ELEC" ever change? if not it should not be stored
> in the table. It looks like what you have are three different types of
> data. Normally they should not be stored in the same field.
>
> If you can tell us more about what each part means and what use will be
> made of it maybe we can make some more specific suggestions.
>
> --
> Joseph Meehan
>
> Dia 's Muire duit
>
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonumber without a autonumber field PennyB Microsoft Access VBA Modules 3 3rd Jul 2009 05:41 PM
Create a Sub Autonumber that re-assigns autonumber to each data groupin a sorted field. Junwenren Microsoft Access 1 4th Oct 2008 05:30 AM
Adding autonumber to a non autonumber field don Microsoft Access 2 22nd Apr 2008 05:00 PM
code to autonumber form ID without using autonumber datatype reservedbcreater Microsoft Access Form Coding 4 27th Jan 2005 03:56 PM
AutoNumber field does not contain "(AutoNumber)" when adding a record Keith Microsoft Access Forms 3 12th Nov 2003 04:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.