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
>
>
>
>
>
|