Re: Query Not Displaying All Records

Tech-Archive recommends: Speed Up your PC by fixing your registry



Null is no value at all. (looks like the field is blank)

Zero is a value.

I was not saying that you should not have zero as a default. You can have a
default value for a field UNLESS the field is part of a relationship. In
that case, it is ALMOST always a bad idea to have a default value (at least
in my opinion).


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Droogie" <Droogie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5FAD232B-9F75-4AAB-B5EF-B8D14C5237AE@xxxxxxxxxxxxxxxx
John,

What do you mean by "null"? The fields that aren't required in my
database
have a default value of "0". Would that be considered null? Please
explain.



"John Spencer" wrote:

Foreign keys should almost never have a default value. Normally, I set
all foreign keys to be null.

As noted else thread, you should be able to show your records from the
Title table if you change the type of join.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Droogie wrote:
I have a query that will not display records from fields that aren't
required
but are related to a parent table. For example:

The "TitleID" field relates to the "Title" table's primary key. This
field
is optional and if a user selects nothing than the default value is
zero.
However, with referential intregy deselected the form accepts the zero
but
when I run a query it will not report the record back to me. When I go
into
my table I can see it but when I run the query I can't. I've also
manually
gone into the table and changed the foreign ID to 1 and then run the
query
and it works.

Help!



.



Relevant Pages

  • Re: Conditional printing of records in the detail section of a rep
    ... I got sick, still sick, so I'm putting this on hold for the moment. ... In query design, type an expression like ... sums the numbers from approximately 35 numerical fields ... The default data is zero. ...
    (microsoft.public.access.reports)
  • Re: Query OVERFLOW Error
    ... The overflow error is caused by you dividing by zero. ... John Spencer ... I'm building a Select Query that is attempting to select all 's ...
    (microsoft.public.access.queries)
  • Re: Conditional printing of records in the detail section of a rep
    ... The query option, as outlined in your post, doesn't work. ... The default data is zero. ... commands used in the Event Procedure? ... unbound form with a command button to open the report filtered, ...
    (microsoft.public.access.reports)
  • Re: Does DateDiff Have A Bug
    ... a calculated field in a query is the way to go here. ... But here's why I added the DaysRemaining ... I'm trying to write the result of lngDays when it reaches zero days ...
    (microsoft.public.access.formscoding)
  • Re: Sum Expression gives 1.45519152283669E-11 instead of 0 (zero)
    ... So, I gather, any time I want to omit zero records in query, I'll have to ... where TransactionQuantity and CreditDebit are Integers while CurrentPrice ... AssetHolding: ...
    (microsoft.public.access.queries)