A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to prevent inputting duplicate addresses in access form



 
 
Thread Tools Display Modes
  #1  
Old October 28th, 2009, 01:00 AM posted to microsoft.public.access.forms
sno
external usenet poster
 
Posts: 4
Default how to prevent inputting duplicate addresses in access form

I have designed a database table and form to enter data into the table. The
table contains street addresses where work is to be done. What I need to do,
is to ensure that street addresses are entered only once. The street address
field is a text field. Can anyone advise how I can do this, as some of the
street names are the same but numbers are different.
  #2  
Old October 28th, 2009, 01:15 AM posted to microsoft.public.access.forms
bhicks11 via AccessMonster.com
external usenet poster
 
Posts: 529
Default how to prevent inputting duplicate addresses in access form

Preventing Duplicate Values in a Field
Step 1Understand that this method will prevent duplicate values from being
entered in a field. For example, you might want to ensure that you enter a
name only once in your address book.

Open a table in Design view.

In the upper part of the screen, click on the field that you want to prevent
duplicate entries in.

In the lower part of the screen, click the Indexed property box and select
Yes (No Duplicates).

Bonnie
http://www.dataplus-svc.com

Sno wrote:
I have designed a database table and form to enter data into the table. The
table contains street addresses where work is to be done. What I need to do,
is to ensure that street addresses are entered only once. The street address
field is a text field. Can anyone advise how I can do this, as some of the
street names are the same but numbers are different.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200910/1

  #3  
Old October 28th, 2009, 01:37 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default how to prevent inputting duplicate addresses in access form

On Tue, 27 Oct 2009 18:00:01 -0700, Sno wrote:

I have designed a database table and form to enter data into the table. The
table contains street addresses where work is to be done. What I need to do,
is to ensure that street addresses are entered only once. The street address
field is a text field. Can anyone advise how I can do this, as some of the
street names are the same but numbers are different.


I would think carefully about your table design here. Is "312 Main St." the
same address as "312 Main" or "312 Main Street" or "312 W. Main St."?

Or maybe there's a "312 E. Main St." as well???

Managing address data can be tricky, and will depend on your problem space.
Are these all addresses in one metropolitan area? If so, you might want to get
in touch with the appropriate municipal tax authority and see if they have an
available database of addresses, or at least of street names. You may want to
break down the address into Address, Street, Direction, and Suffix (e.g.
"St.", "Ave.", "Blvd.", "Court"), and use a more finely divided form than just
a free form textbox. I'd really recommend having an Addresses table, with a
numeric AddressID, and store just this ID in your table (rather than the text
of the address).

You may need to use VBA code in the Address Form's BeforeUpdate event to
search for previous instances of the address.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.