Newbie -Working with dates-HELP!

T

Tracey

I'm working with a form that has a (date to return by) field. Is there any way to alert me when the date is past due? I have tried inserting a command button on the form based on a querry using the DateAdd function, but am having trouble building the querry. ANY help would be greatly appreciated.
 
F

fredg

I'm working with a form that has a (date to return by) field. Is there any way to alert me when the date is past due? I have tried inserting a command button on the form based on a querry using the DateAdd function, but am having trouble building the querry. ANY help would be greatly appreciated.

Would simply changing the control's color be an alert enough?
No command button, no DateDiff needed.
Code the Form's Current event:

If [DateReturn]< Date Then
[DateReturn].BackColor = vbRed
Else
[DateReturn].BackColor = vbWhite
End If

You could also use conditional formatting if you are using Access 2000
or higher.
 

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