Comparing a date field with today's date

G

Guest

My report contains a date field 'Delivered_On' and a label 'lbl_Sited'; both
have the visible format set to no.

I am trying to get the date field to become visible if the date is greater
than today's date, and the label to become visible if the date field is less
than today.

When I use the argument "If Me.Delivered_On >= Now() Then.....", I get an
error "You entered an expression that has no value"
 
G

Guest

I would use only text boxes and no code. Set the control sources to something
like:

=IIf([Delivered_On] > Date(), [Delivered_On], Null)
=IIf([Delivered_On] > Date(), Null, "Sited Caption")
 
G

Guest

Duane - worked first time. Very many thanks for your time and input.
--
Keith W


Duane Hookom said:
I would use only text boxes and no code. Set the control sources to something
like:

=IIf([Delivered_On] > Date(), [Delivered_On], Null)
=IIf([Delivered_On] > Date(), Null, "Sited Caption")

--
Duane Hookom
Microsoft Access MVP


Keith Woollacott said:
My report contains a date field 'Delivered_On' and a label 'lbl_Sited'; both
have the visible format set to no.

I am trying to get the date field to become visible if the date is greater
than today's date, and the label to become visible if the date field is less
than today.

When I use the argument "If Me.Delivered_On >= Now() Then.....", I get an
error "You entered an expression that has no value"
 

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