Auto Number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I made a form that assigns an auto incriment number to each employee i find.
However if i find the same employee twice the auto incriment number doesnt
change but assigns that person to the same number as before?

anyone know how to solve this
 
An auto number would incriment each time a new record is added. If you are
"finding" records, then the field should pull up the number associated with
that record. If you "find" the same person twice, why would you want them
to have two separate numbers?

For that matter, why are you using an auto-number for employee number at
all? Generally, an autonumber should be used in the background to give each
record a unique identifier. A meaningful number (like employee number)
should be assigned using some meaningful method. The most common is to
locate the highest number in the table (DMAX) and add one to it. You can do
a search if you need more help with that.

Rick B
 
why does everyone question why i need to do something.
the reason why i need a reference number is this:
i'm setting up a help desk center database. Say you call in twice about two
issues:
well i cant give you the same reference number twice right?

hence why i need to associate a difference number each time. anyone have
any ideas about doing this?
 
Then use the DMAX method I mentioned and locate the highest number out
there, then add one to it. It sounds, though, like you may have some
normalization issues. You say you are "finding" the employee. That makes
me think that the employee information (including an employee number) should
be stored in a separate table. The Reference number (or issue number, or
ticket number) is the number you are trying to create. That should be in
your primary table.

For more information on using DMAX to create the next number, do a search
here or in HELP. That issue is discussed in these newsgroups almost every
day.

Rick B
 
the reason why i need a reference number is this:
i'm setting up a help desk center database. Say you call in twice about
two
issues:
well i cant give you the same reference number twice right?

Each table in a database should be a unique entity. Thus you would have a
table for People and a separate table for Help Desk Tickets. The unique
number for a given person, who calls in twice, would ALWAYS be the same. The
unique number for a given call would be on a per call basis. Thus you might
set up your tables like this.

tblPeople
Person_ID
LName
FName
....
Other fields that are related to people

tblHDTickets
Ticket_ID
Person_ID
Date_Logged
Description
....
Other fields related to help desk tickets
 
I dont wanna do that.
I have it setup so that i call upon the user information by finding his last
name which grabs all the rest of his information.

Then I type in the person's question.
I tried doing the DMAX function but cant seem to figure it out.
i wrote down
Reference_Number.Value = DMax("Reference Number", "[Call Center Table]", 1)
is tis right?
 
creating a separate table for "person" data will allow you to do what you
mention in the first paragraph of this post. You would search for a person,
and have the other data display.

This is NORMALIZATION of your data. If you don't get your structure right
now, you'll always have problems.

Just curious... Why don't you just use the built-in "Service Call
Management" template that comes with Access and then modify it to better
meet your needs?

Rick B


RigasMinho said:
I dont wanna do that.
I have it setup so that i call upon the user information by finding his last
name which grabs all the rest of his information.

Then I type in the person's question.
I tried doing the DMAX function but cant seem to figure it out.
i wrote down
Reference_Number.Value = DMax("Reference Number", "[Call Center Table]", 1)
is tis right?
RigasMinho said:
I made a form that assigns an auto incriment number to each employee i find.
However if i find the same employee twice the auto incriment number doesnt
change but assigns that person to the same number as before?

anyone know how to solve this
 
the one that comes with access is too bulky. i needed something really small
and short.
gosh this index number is driving me insane.

BTW: i do have a sepearate table for "personal data".
What do u mean by normalization?

Rick B said:
creating a separate table for "person" data will allow you to do what you
mention in the first paragraph of this post. You would search for a person,
and have the other data display.

This is NORMALIZATION of your data. If you don't get your structure right
now, you'll always have problems.

Just curious... Why don't you just use the built-in "Service Call
Management" template that comes with Access and then modify it to better
meet your needs?

Rick B


RigasMinho said:
I dont wanna do that.
I have it setup so that i call upon the user information by finding his last
name which grabs all the rest of his information.

Then I type in the person's question.
I tried doing the DMAX function but cant seem to figure it out.
i wrote down
Reference_Number.Value = DMax("Reference Number", "[Call Center Table]", 1)
is tis right?
RigasMinho said:
I made a form that assigns an auto incriment number to each employee i find.
However if i find the same employee twice the auto incriment number doesnt
change but assigns that person to the same number as before?

anyone know how to solve this
 
Back
Top