473,419 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Unique with empty records?

ET
Hi!

I'll need help on what todo with this information in table...

There has to be a unique on one column (Item ID, for inventory purpose)
but in many cases that ID is not known... thus, many empty records for
that column exist in a table.
I tried to create unique index (no duplicates), of course, it failed
because of many empty records...
Now, is there ANY way to keep those empty records, and allow new empty
records for that field,
but if user tries to enter ID that already exist in a table, the Access
will give warning message about
violation of unique?
Thank you!

Nov 29 '05 #1
2 1706
1. Open your table in design view.

2. Open the Indexes dialog (View menu.)

3. Select the index on the [Item ID] field.

4. In the lower pane of the dialog, leave Unique as Yes, and change Ignore
Nulls to Yes.

The index now permits any number of null values, but no duplicates.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ET" <ve****@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...

I'll need help on what todo with this information in table...

There has to be a unique on one column (Item ID, for inventory purpose)
but in many cases that ID is not known... thus, many empty records for
that column exist in a table.
I tried to create unique index (no duplicates), of course, it failed
because of many empty records...
Now, is there ANY way to keep those empty records, and allow new empty
records for that field,
but if user tries to enter ID that already exist in a table, the Access
will give warning message about violation of unique?

Nov 29 '05 #2
ET wrote:
Hi!

I'll need help on what todo with this information in table...

There has to be a unique on one column (Item ID, for inventory purpose)
but in many cases that ID is not known... thus, many empty records for
that column exist in a table.
I tried to create unique index (no duplicates), of course, it failed
because of many empty records...
Now, is there ANY way to keep those empty records, and allow new empty
records for that field,
but if user tries to enter ID that already exist in a table, the Access
will give warning message about
violation of unique?


One of the properties of an index is "Ignore Nulls", this should work
for you.
Nov 29 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Adrian Parker | last post by:
Hi. I have a date time picker in my program which uses ADO to read from an Access database. It works perfectly, unless the database is empty (no records) when opened. When you try to open an...
0
by: Tanamon | last post by:
Hello All, I am a MySQL newbie trying to write a query that selects file_name records possessing the highest numbered version for that unique file_name. I show sample data and two trial queries...
9
by: Rich S. | last post by:
Hi In an earlier posting I was asking how to read thru millions of data records keeping the top 2000 (where the top values are based upon a field in the record) and niklasb suggested using a...
18
by: Neil | last post by:
I am using SQL 7 with an MS Access 2000 MDB front end, using bound forms with ODBC linked tables. In one form, the user needs to be able to check a box to select one or more records. This is...
3
by: Beat Scheidiger | last post by:
I do not quite understand this property. Everything is seems clear to me, when I read the corresponding help text. But in practice I have a question: Why are there 3 identical records in the...
3
by: Phil | last post by:
I am looking to set up a hyperlink control on a form to retrieve letters that correspond to a record on a form. That is, there may be 100 form records, and I would like each of those form records...
2
by: D. Dante Lorenso | last post by:
I'm trying to build a table that will store a history of records by enumerating the records. I want the newest record to always be number ZERO, so I created a trigger on my table to handle the...
2
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg...
2
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.