Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Data Validation


Message #1 by "wambui njoroge" <kagdw189@b...> on Sat, 25 Jan 2003 02:03:32
Hi all,

I have an access 2000 database for student records. The primary key is an
autonumber. I need to validate the data entered to ensure that duplicate
names are not entered. 

How do I do this using VBA?

Thanks.
Wambui
Message #2 by "Richard Lobel" <richard@a...> on Fri, 24 Jan 2003 18:01:50 -0800
Several ways to accomplish this. Here are just a couple:
1. Set the field to not allow duplicates. This will bring up an error
message box when a duplicate is attempted.
2. In the Before_Update event use the value in the text box where the
student's name is and write a Find routine. If the value is found you
know it would be a duplicate and you can take whatever preventitive
action you want.

Richard Lobel
President
NoClassroom.com
Live Software training 
Right over the Internet 
richard@n...
Tel:  (xxx) xxx-xxxx
Fax:  (xxx) xxx-xxxx

*****ORIGINAL MESSAGE*****
I have an access 2000 database for student records. The primary key is
an autonumber. I need to validate the data entered to ensure that
duplicate names are not entered. 

How do I do this using VBA?

Message #3 by "bwarehouse" <bwarehouse@y...> on Sat, 25 Jan 2003 13:43:18 -0700
open the table in design view, choose the field that has the name
information.. at the bottom of the screen on the General Tab,
goto the Indexed Column, and choose Yes(No duplicates)


later,
bware

-----Original Message-----
From: wambui njoroge [mailto:kagdw189@b...]
Sent: Saturday, January 25, 2003 2:04 AM
To: Access
Subject: [access] Data Validation


Hi all,

I have an access 2000 database for student records. The primary key is an
autonumber. I need to validate the data entered to ensure that duplicate
names are not entered. 

How do I do this using VBA?

Thanks.
Wambui

Message #4 by "wambui njoroge" <kagdw189@b...> on Fri, 31 Jan 2003 17:34:03
Since I have the last name and first name in separate fields, I will try 
the find routine.

Thanks.

Wambui

> Several ways to accomplish this. Here are just a couple:
1. Set the field to not allow duplicates. This will bring up an error
message box when a duplicate is attempted.
2. In the Before_Update event use the value in the text box where the
student's name is and write a Find routine. If the value is found you
know it would be a duplicate and you can take whatever preventitive
action you want.

Richard Lobel
President
NoClassroom.com
Live Software training 
Right over the Internet 
richard@n...
Tel:  (xxx) xxx-xxxx
Fax:  (xxx) xxx-xxxx

*****ORIGINAL MESSAGE*****
I have an access 2000 database for student records. The primary key is
an autonumber. I need to validate the data entered to ensure that
duplicate names are not entered. 

How do I do this using VBA?

Message #5 by "Hamilton. Tom" <hamiltont@s...> on Fri, 31 Jan 2003 09:26:03 -0800
I prefer to create an Index in the Student table that forces uniqueness. 
 See the entry for UniqueName


 -----Original Message-----
From: 	wambui njoroge [mailto:kagdw189@b...]
Sent:	Friday, January 31, 2003 9:34 AM
To:	Access
Subject:	[access] RE: Data Validation

Since I have the last name and first name in separate fields, I will try 

the find routine.

Thanks.

Wambui

> Several ways to accomplish this. Here are just a couple:
1. Set the field to not allow duplicates. This will bring up an error
message box when a duplicate is attempted.
2. In the Before_Update event use the value in the text box where the
student's name is and write a Find routine. If the value is found you
know it would be a duplicate and you can take whatever preventitive
action you want.

Richard Lobel
President
NoClassroom.com
Live Software training
Right over the Internet
richard@n...
Tel:  (xxx) xxx-xxxx
Fax:  (xxx) xxx-xxxx

*****ORIGINAL MESSAGE*****
I have an access 2000 database for student records. The primary key is
an autonumber. I need to validate the data entered to ensure that
duplicate names are not entered.

How do I do this using VBA?


Message #6 by "wambui njoroge" <KAGDW189@B...> on Fri, 31 Jan 2003 18:44:14
How do I do this with the two names in separate fields? I am still 
learning access and visual basic so I apologise if this is a simple thing 
to do.

Thanks for your reply.
Wambui

> I prefer to create an Index in the Student table that forces uniqueness. 

 See the entry for UniqueName


 -----Original Message-----
From: 	wambui njoroge [mailto:kagdw189@b...]
Sent:	Friday, January 31, 2003 9:34 AM
To:	Access
Subject:	[access] RE: Data Validation

Since I have the last name and first name in separate fields, I will try 

the find routine.

Thanks.

Wambui

> Several ways to accomplish this. Here are just a couple:
1. Set the field to not allow duplicates. This will bring up an error
message box when a duplicate is attempted.
2. In the Before_Update event use the value in the text box where the
student's name is and write a Find routine. If the value is found you
know it would be a duplicate and you can take whatever preventitive
action you want.

Richard Lobel
President
NoClassroom.com
Live Software training
Right over the Internet
richard@n...
Tel:  (xxx) xxx-xxxx
Fax:  (xxx) xxx-xxxx

*****ORIGINAL MESSAGE*****
I have an access 2000 database for student records. The primary key is
an autonumber. I need to validate the data entered to ensure that
duplicate names are not entered.

How do I do this using VBA?


Message #7 by "Gerald, Rand" <RGerald@u...> on Fri, 31 Jan 2003 17:08:51 -0600
Hi Wambui,

You should never force uniqueness based upon names unless you can guarantee
that you will never have two people with the same name.

You may wish to test each new name to see if it is already in use and if so
perform further testing to verify if the name is a true duplicate of the
same person or a case of two different people who just happen to have the
same name.

Rand


-----Original Message-----
From: wambui njoroge [mailto:KAGDW189@B...]
Sent: Friday, January 31, 2003 12:44
To: Access
Subject: [access] RE: Data Validation

How do I do this with the two names in separate fields? I am still
learning access and visual basic so I apologise if this is a simple thing
to do.

Thanks for your reply.
Wambui

> I prefer to create an Index in the Student table that forces uniqueness.

 See the entry for UniqueName


 -----Original Message-----
From:   wambui njoroge [mailto:kagdw189@b...]
Sent:   Friday, January 31, 2003 9:34 AM
To:     Access
Subject:        [access] RE: Data Validation

Since I have the last name and first name in separate fields, I will try 

the find routine.

Thanks.

Wambui

> Several ways to accomplish this. Here are just a couple:
1. Set the field to not allow duplicates. This will bring up an error
message box when a duplicate is attempted.
2. In the Before_Update event use the value in the text box where the
student's name is and write a Find routine. If the value is found you
know it would be a duplicate and you can take whatever preventitive
action you want.

Richard Lobel
President
NoClassroom.com
Live Software training
Right over the Internet
richard@n...
Tel:  (xxx) xxx-xxxx
Fax:  (xxx) xxx-xxxx

*****ORIGINAL MESSAGE*****
I have an access 2000 database for student records. The primary key is
an autonumber. I need to validate the data entered to ensure that
duplicate names are not entered.

How do I do this using VBA?



  Return to Index