Auto fill field if one date is greater that another

P

Paul

Hi, I have a TargetDate field and a ResponseDate field. If Response
date is after TargetDate I want to autoenter NO in a new field called
ResponseInTime. Can anyone help. Thanks
 
B

Bob Quintal

Hi, I have a TargetDate field and a ResponseDate field. If Response
date is after TargetDate I want to autoenter NO in a new field called
ResponseInTime. Can anyone help. Thanks

Because calculable data should never be stored in a table, the people
who developed Access did not waste time creating utilities to make this
easier.

The right way to get this calculated field is in a query,or a form.

=iif(ResponseDate > TargetDate, "NO","Yes") can be put in the Record
Source property of a form or report textbox.

ResponseInTime: if(ResponseDate > TargetDate, "NO","Yes") would be how
to enter it in a query.

If you insist in storing it in a field, put
[ResponseInTime] = iif(ResponseDate > TargetDate, "NO","Yes")
in the After_Update Event's visual basic code for the two 'time'
fields.
 
P

Paul

Hi, I have a TargetDate field and a ResponseDate field. If Response
date is after TargetDate I want to autoenter NO in a new field called
ResponseInTime. Can anyone help. Thanks

Because calculable data should never be stored in a table, the people
who developed Access did not waste time creating utilities to make this
easier.

The right way to get this calculated field is in a query,or a form.

=iif(ResponseDate > TargetDate, "NO","Yes") can be put in the Record
Source property of a form or report textbox.

ResponseInTime: if(ResponseDate > TargetDate, "NO","Yes") would be how
to enter it in a query.

If you insist in storing it in a field, put
[ResponseInTime] = iif(ResponseDate > TargetDate, "NO","Yes")
in the  After_Update Event's visual basic code for the two 'time'
fields.

Thanks for the info, The field that I am entering is Unbound, works
great. thanks
 

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