Missing records

G

Guest

Hello.

I have a table with a field called [CustomerID], and some records of this
table have this field with a number and some are empty.

I want to make a query that returns all the records, even those which
[CustomerID] is empty (please note that [CustomerID] is not the primary key
of this table).

Which expression should I write in the query (in [CustomerID] column) to do
this?

The times that I have tried, the query always gave me the records with a not
empty [CustomerID], hiding the ones that have this field empty.

Thank you in advance.

Acores
 
J

Jeff Boyce

Create a new query in design view. Add this table. Add the [CustomerID]
field and as many others as you care to see.

In the Selection/Criterion "cell" beneath [CustomerID], put
Is Null Or = ""

This will return rows without a defined value (is null), and those that had
a value that may have been backspaced over ("" - also known as a zero-length
string).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John W. Vinson

Hello.

I have a table with a field called [CustomerID], and some records of this
table have this field with a number and some are empty.

I want to make a query that returns all the records, even those which
[CustomerID] is empty (please note that [CustomerID] is not the primary key
of this table).

Which expression should I write in the query (in [CustomerID] column) to do
this?

The times that I have tried, the query always gave me the records with a not
empty [CustomerID], hiding the ones that have this field empty.

Thank you in advance.

Acores

Umm?

Just don't put any criterion on the field AT ALL. Simply leave it blank. All
records will be returned (provided, of course, that they meet any other
criteria on other fields).

John W. Vinson [MVP]
 

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