check date() against field "due date"

  • Thread starter Stella P via AccessMonster.com
  • Start date
S

Stella P via AccessMonster.com

L.S.

I have a form with 2 subforms.
On subform2 there is a field which has as default date().
On subform1 there is a field with the "due date" of the product.

The "default date", which is todays date when opening the form, has to be
checked against the "due date".
If "default date" > than "due date" the field "due date" has to change of
background color and blink and a message box has to appear saying that
"Default date is > than due date".

How can I have "default date" (date() ) check against "due date"?
I have the coding in the beforeupdate event in the field "default date", but
it only works if I enter the "default date" manually.
And how can I have the cursor on the field "default date" if this field >
than "due date".
I've tried using SetFocus but I keep on getting an error.

Thanks in advance for your help.

Stella
 
A

Alp Bekisoglu

Have you checked Conditional Formatting? You can set the background color of
the field to red if the field value is less than Now(). But Access2000 does
not provide an option for blinking there. You would need to code that part.

For the message part, you can also code it.

Hope it helps a little.

Alp
 
S

Stella Pieters via AccessMonster.com

Hi Alp,

Thanks for the solution.
I have this other part which I cannot solve.

How can I have "default date" (which has as default date() checked against
"due date"?
I have the coding in the beforeupdate event in the field "default date", but
it only works if I enter the "default date" manually.
And how can I have the cursor focused on the field "default date" if this
field >
than "due date".
I've tried using SetFocus but I keep on getting an error.


Alp said:
Have you checked Conditional Formatting? You can set the background color of
the field to red if the field value is less than Now(). But Access2000 does
not provide an option for blinking there. You would need to code that part.

For the message part, you can also code it.

Hope it helps a little.

Alp
[quoted text clipped - 19 lines]
 

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