How to refresh field in form

T

Tamara

I have a tick box field called 'oldcase' in a form - it is meant to show
cases >9 months old. LodgementDate is the date case was lodged. In the
properties of the whole form I have code under 'before update' which states

If Me.LodgementDate < (Now()-270) Then
Me.Old case = 1
Else
Me.Old case = 0

This works fine when I enter data in the form but if I am just looking
through the form another day without updating data - the field 'oldcase' does
not update - can you please advise how to update - I know it is something to
do with 'dirty' but don't know what to do with it.
 
L

Linq Adams via AccessMonster.com

Your code also needs to be in the Form_Current event, then it will be
calculated each time you move to a given record.

Also,

Me.Oldcase = 1

should be

Me.Oldcase = -1
 

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