place an overdue display in the header

D

Dale G

I would like to place an overdue display in the header of the
frmUniformOrders, something like the one for possible duplicate in the
Contacts db.

I think I would have to place a date ordered text box in the form and
another text box in the header that would remain invisible until the set time
between the two has elapsed.

I’m using Access 2007.

Could anyone assist or lead me to a method (or link) to get that done?
 
S

Sean Timmons

Sure.. Create the text box with your overhead message. Make Visible False on
your properties menu.

Pull up your form properties, and on form load, have an event procedure.

The code should be something like,

If datetextbox.Value < now() Then
messagebox.visible = True
End IF
 
D

Dale G

Thank you, I tried your suggestion, but I can get it to work.

I named the text box I put in the header, MessageBox.

The text box on the order form is named DatePromised.

In the MessageBox I wrote, Over Due, and set visible to no.

I pulled up the form properties, and on form load I set the event procedure
to.

If DatePromised.Value < now() Then
Messagebox.visible = True
End IF

I clicked the save icon and that’s it. I must be doing something wrong.
 
J

John Spencer

I would probably place the code in the form's current event instead of the
load event.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

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