Fill data entry form

J

Johnny

Hello

when inserting new costumer in a data entry form, I want to check if
he already exist, and if so I need to fill the in the entry form as a
new record with all data in table related to that costumer.

Thanks in advance
 
U

UpRider

If the customer already exists, why do you want to add him to your table
again?

UpRider
 
H

Henry J

What is your primary key such as a phone number, or customerID combined of
zipcode + 1st three letters of name. When you try to add the customerID,
Access will show an error message "duplicate key".
 
T

tina

either example serves as a poor primary key, i'm afraid. phone number
change, and get recycled. people move, and get married, divorced, or change
their names for other reasons, and of course many people with the same first
three letters of name (never mind same name entirely) can live in the same
zip code. the purpose of the primary key is to uniquely identify each record
*to the system*, in order to relate records between tables (see
http://www.dbpd.com/vault/9805xtra.htm). in the cases of the examples
posted, an autonumber would serve the purpose much better.

hth
 
J

Johnny

If the customer already exists, why do you want to add him to your table
again?

UpRider








- Mostrar texto citado -

Hi UpRider

The problem is that costumers can get in and out. When they left I
store all info. of that costumer in other table, when that costumer is
registred again as new I don´t want to retype all info again and store
as a new record. So the purpose is:
Add new record for that costumer, check if name exist, if so, retrieve
all info from table and fill in the entry form as new record, allowing
also to fill new info. and store when finishing.
Users are supose to write the name in accordance with ID card, to
avoid different name for same person.
Primary key is CostumerID (auto-number).

Thanks
Johnny
 
P

Pete

Is it all the same table, use a combo box to look up a record, a find combo
box. Wizard will help you create it.

Pete D.
 
T

tina

the solution is to use one table to store customer records. add a field for
Terminated or Inactive - a Yes/No field will do, though i would more likely
use a Date/Time field as that more specific data often comes in handy. it's
easy to query for active (or inactive) records only - and re-instating a
customer can be as easy as deleting the date in the field, or changing a Yes
to a No.

hth


If the customer already exists, why do you want to add him to your table
again?

UpRider








- Mostrar texto citado -

Hi UpRider

The problem is that costumers can get in and out. When they left I
store all info. of that costumer in other table, when that costumer is
registred again as new I don´t want to retype all info again and store
as a new record. So the purpose is:
Add new record for that costumer, check if name exist, if so, retrieve
all info from table and fill in the entry form as new record, allowing
also to fill new info. and store when finishing.
Users are supose to write the name in accordance with ID card, to
avoid different name for same person.
Primary key is CostumerID (auto-number).

Thanks
Johnny
 
H

Henry J

True,
While autonumbers are unique, for users they do not exist. So, the user
must have something they recognize and know. So autonumbers for user
purposes are a poor example.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top