Default Date Field in Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that has dates in it. When I print a report from that table,
it leaves the date field empty if the date was not inputted. I need it to
print "..." if there is not a date there. How do I do it?
 
You can either set the Control Source for the textbox on your report to

=Nz([MyDateField], "...")

(including the equal sign: replace MyDateField with the appropriate field
name)(

or you can create a query that has a computed field as above (without the
equal sign in the query), and use the query as the Record Source for the
report.
 
try this...
replace the date field in the report design with a text
box containing the following expression:
=IIf(IsNull([mydate]),"...",[mydate])

where mydate is the name of your date field. You could
just as well use "not input" or any other " " string in
place of "...", perhaps to give the user more info about
the status of the date field for that record.

Hope this helps
 
I tried this, but kept getting circular reference errors.

Douglas J. Steele said:
You can either set the Control Source for the textbox on your report to

=Nz([MyDateField], "...")

(including the equal sign: replace MyDateField with the appropriate field
name)(

or you can create a query that has a computed field as above (without the
equal sign in the query), and use the query as the Record Source for the
report.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)


Mike said:
I have a table that has dates in it. When I print a report from that table,
it leaves the date field empty if the date was not inputted. I need it to
print "..." if there is not a date there. How do I do it?
 
Worked wonderfully! Thanks for your help!

try this...
replace the date field in the report design with a text
box containing the following expression:
=IIf(IsNull([mydate]),"...",[mydate])

where mydate is the name of your date field. You could
just as well use "not input" or any other " " string in
place of "...", perhaps to give the user more info about
the status of the date field for that record.

Hope this helps
-----Original Message-----
I have a table that has dates in it. When I print a report from that table,
it leaves the date field empty if the date was not inputted. I need it to
print "..." if there is not a date there. How do I do it?
.
 

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

Back
Top