Re: Is Null

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

From: Brendan Reynolds (brenreyn)
Date: 09/16/04


Date: Thu, 16 Sep 2004 10:46:12 +0100

As Rick says, =NZ([NameOfDateField], "-") in the control source should do
it. Change 'NameOfDateField' to the actual name of your field, obviously,
and if the form is based on a query rather than directly on the table, make
sure that the date field is included in the query. And, as Rick says, make
sure that the name of the text box is not the same as the name of the field.

-- 
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
"troubled" <troubled@discussions.microsoft.com> wrote in message 
news:53FFA2F0-810D-4D24-B293-CFF4BA8B0A3F@microsoft.com...
> Okay, I did enter NZ([NameOfDateField], "-") into the control source and I
> received an Syntax error message.  Then I tryed to enter
> NZ([NameOfDateField], "-") into the query itself and it filtered out all 
> the
> null records which is not what I want it to do.  Hmmmm...  I am doomed!
>
> "Rick Brandt" wrote:
>
>> "troubled" <troubled@discussions.microsoft.com> wrote in message
>> news:F466E6C7-C4CB-4339-AB86-5E07D573B0C2@microsoft.com...
>> > Brendan,
>> > Here is the real issue, I am running a reports with date fields.  The
>> > problem is not every record has a date in that field.  So I don't want 
>> > to
>> > have a blank spot in my report, instead I would like to have a dash "-"
>> to
>> > show that this date field in the record was left empty.  How can I do
>> that?
>> > Thank you for your help and suggestions.
>>
>> As Brendon stated, use a ControlSource for your control of...
>>
>> Nz([NameOfDateField], "-")
>>
>> ....instead of the name of your date field.  Any record where the date is
>> null will display the dash.
>>
>>
>> -- 
>> I don't check the Email account attached
>> to this message.     Send instead to...
>> RBrandt    at       Hunter      dot      com
>>
>>
>> 


Relevant Pages

  • Re: SQL compile error
    ... Thanks Dirk. ... query as you described. ... odometer reading. ... >assembling into the controlsource string: ...
    (microsoft.public.access.forms)
  • Re: entering query results into a variable in VBA
    ... me to use a real e-mail address in public newsgroups. ... GlobalSign digital certificate is a forgery and should be deleted without ... > I'm new to Access VBA, But i've used VBA in other office products ... > I then want to use that variable as criteria in another query. ...
    (microsoft.public.access.macros)
  • Re: #error and #name?
    ... Also, make sure the sum is in the a group or report footer, not the Page ... > the report is linked to a query, and contains text fields to display each ... > I have also tried ControlSource = sumbut in both cases I ...
    (microsoft.public.access.reports)
  • Re: Start Report Numbering at 4
    ... What is the ControlSource for the control that displays the line numbers? ... numbering at 1 when the source =1, I need it to start numbering at 4. ... All the other cells except for total come off a query, ... numbering is automatic with the report. ...
    (microsoft.public.access.modulesdaovba)
  • Re: What are these?
    ... If you create a query using your table, you will see that the FileData, FileName and FileType are available in the table in the upper pane of query design. ... If you drag show the attachment field's FileType in the grid, it will display JPG or DOC or whatever type it is. ... When I dragged them onto the form, Documents.FileData is identified as an Attachment, with a ControlSource as Documents.FileData. ...
    (microsoft.public.access.forms)