Open a form if a date field is passed

Neil_Pattison

Registered User.
Local time
Today, 17:20
Joined
Aug 24, 2005
Messages
73
I have a form with numerous fields on it, with the one I'm concerned about being a date field.

I want a different form to open automatically if the above date field is in the past (this will act as a warning to the user).

I've created the warning form as a pop-up view but just want to know the best way to have it open automatically.

Can this be done via a macro in the OnOpen Property (or maybe OnLoad) or will this have to written in vba.

Any ideas would be greatly appreciated.
 
Do you want the other form to open up instead of or as well as the existing form?

Can the user access the date field and change it to a day in the past which then requires the other form to open?

This will affect which event(s) you use
 
...I have a form with numerous fields on it, with the one I'm concerned about being a date field.

I want a different form to open automatically if the above date field is in the past (this will act as a warning to the user)
...
Does this Form only have one Record? If not, the OnOpen/OnLoad event is inappropriate, as it would only relate to the condition of the date Field in the first Record, not all Records!

Also, why use a Popup Form instead of a much simple Messagebox?

Linq ;0)>
 
Thanks for your reply.

I'm wanting it to open as well as the original form. The second form will only act as a warning to alert the user that the date is in the past.

The user can change the date field, but it would only be changed to a date in the future, and not the past, so this should never trigger the second form opening
 
In that case I would put it in the form on current event - all data will have been loaded and if you can 'browse' the recordset without closing and opening the form it will still fire
 
Does this Form only have one Record? If not, the OnOpen/OnLoad event is inappropriate, as it would only relate to the condition of the date Field in the first Record, not all Records!

Also, why use a Popup Form instead of a much simple Messagebox?

Linq ;0)>

I could use a message box if it is simpler.

It is possible that the form when opened will have more than one record so I would need it to be able to notify the user that there is a date in the past on any of the records
 
Thanks for you help on this, I'll just put a message box in the on current event
 

Users who are viewing this thread

Back
Top Bottom