Change One Field When Data Entered In Another

statsman

Active member
Local time
Today, 19:37
Joined
Aug 22, 2004
Messages
2,088
My Edit info form has several fields. The two of interest are:
Filestatus - text - open or closed
Dateclosed - date format
When the file is created, the filestatus field is set to "Open". What I would like to do is when a date is entered into the dateclosed field, automatically change the filestatus to "Closed".

Any suggestions?

Thanks in advance.
 
PS
I did try in the afterupdate of the dateclosed field

If [dateclosed] > 0 then
[status] = "CLOSED"
endif


didn't work
 
try
if IsNull(dateclosed)=False then
status = "closed"
End If
 
I would question whether you need the status field at all, if a record's status can be determined by the date field.
 
status field

Paul,

Good point that I overlooked, even though I do it that way myself. However I think in this case there may be queries running that serach for records where the status is closed, regardless of any of the dates. If not the status field may be redundant and just taking up space in the table.

regards

ian
 
Guys
Following your suggestions I have given the status field a re-think.
You're right, it is redundant.
It's amazing the things you learn in this forum.
 
help

Statsman,

Glad to be of help. I agree this forum is a very useful resource and I am always impressed with the knowledge of people here and the help they give.

regards
ian
 

Users who are viewing this thread

Back
Top Bottom