Last Question For 24 Hours From When You Read This Post

Darkwater

Registered User.
Local time
Today, 14:59
Joined
Sep 14, 2006
Messages
22
Ok, I am getting well excited about what Access can do, and how the database I'm working on is coming along. It's the things that you guys find simple that I'm having problems with. So my question is:

I have fields called InitialAssessmentDate and ReviewDate. I want to be able to have a bold coloured label appear on the front page of a client record informing a user (when they access a clients record) when the client is due a review - usually three months after the Initial Assessment Date/and/or three months after the Review Date.

So far I have a couple of bold coloured labels that appear when individual client records open to advise users of other important stuff such as whether the client is high risk (for personal safety) or if the client needs a interpreter or signer: The code used for these two beauties is:

"Private Sub Form_Current()
Me.HighRiskLabel.Visible = Me.High
Me.InterpreterLabel.Visible = Me.Interpreter
End Sub"

Is it possible to do something similar for the date calculation?

Thanks in advance
Doug
 
How about:

Me.LabelName.Visible = (DateDiff("d", Me.DateFieldName, Date) > 90)
 
Thanks

Hi Paul,

Thanks for this:

pbaldy said:
How about:

Me.LabelName.Visible = (DateDiff("d", Me.DateFieldName, Date) > 90)

However, this is what I'm getting with the following code:

Run-time error 94
Invalid Use of Null

Private Sub Form_Current()
Me.HighRiskLabel.Visible = Me.High
Me.InterpreterLabel.Visible = Me.Interpreter
Me.ReviewDueLabel.Visible = (DateDiff("d", Me.InitialContactDate, Date) > 90)
End Sub

I'm sure it's me missing something - overrrrr tired! :o

Thanks
Doug
 
No Matter

I worked out the problem...... duh me! lol Thanks again Paul, your code was top totty, it WAS me that was the problem.

Regards
Doug
 
It's Still Me

I've just been running a couple of test and realised that I may have asked the wrong question!

So, I have my InitialContactDate field which is the start date + 90 days for my ReviewDate field that when reached or passed will show the ReviewDue Label.

What I need is: 'once the ReviewDate has come and gone and the user has entered the next Review Date in the ReviewDate field is for the ReviewDate field to become the focus for calculating when the ReviewDue label appears again'.

Is it possible?

No worries, got the answer and all is well. Thanks for your help, always appreciated.
Thanks
Doug
 
Last edited:

Users who are viewing this thread

Back
Top Bottom