Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate expiry

Status
Not open for further replies.

Bob500

Technical User
Aug 8, 2003
65
EU
Hi,

How would I code this

If (the current date)
and 'datereceived'
are greater than 'date expected'
then show an alert label
---------------------------------------
I currently have this code

Private Sub Form_Load()
if Now and date_reply_received > dateexpectedex
then Me.lblalert.Visible = Not Me.lblalert.Visible

End Sub


But it doesn't work. Also should it be in the onload of the subform or somewhere else

Thanks!
 
Hi Bob500,

You must explicitly state all comparands so use ..

Code:
if Now
Code:
  > dateexpectedex
Code:
and date_reply_received > dateexpectedex

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top