• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 631
  • Last Modified:

format blank field date field on report in MS Access 2007

My Access 2007 report has a date field.  The string date is in the database as 20110101.  I can successfully format it in the report using:
=Mid$([STOP_DATE],5,2) & "/" & Mid$([STOP_DATE],7,2) & "/" & Mid$([STOP_DATE],3,2)

If the field is blank it gives #error.  What syntax can I use to incorporate the "=Mid$([STOP_DATE],5,2) & "/" & Mid$([STOP_DATE],7,2) & "/" & Mid$([STOP_DATE],3,2)" and something like "If isNull[STOP_DATE] then [STOP_DATE] = ""

Thank you,
LindaOKState
0
LindaOKSTATE
Asked:
LindaOKSTATE
1 Solution
 
LucasCommented:
Put this in your textbox:

=iif(isnull([stop_date]),null,Mid$([STOP_DATE],5,2) & "/" & Mid$([STOP_DATE],7,2) & "/" & Mid$([STOP_DATE],3,2))
0
 
LindaOKSTATEAuthor Commented:
exactly what I needed
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now