Field that populates based on other field

N

NewIdiot

I am new to Access and do not have experience with advance language. I would
like to see if it is possible to set up a variable field that updates
automatically everytime you access the table.

example: I have field that captures the meeting date of a topic. In my
other field I want the result "yes" or "no" to be updated when the meeting
date is equal to or prior to todays date.

first, how do you create a field that compares the two and automatically
populates that field with a yes or no.

second, each time the database is accessed and records are retrieved, I need
that field to update automatically.

any suggestions would be helpful.

Thanks
 
J

John Vinson

I am new to Access and do not have experience with advance language. I would
like to see if it is possible to set up a variable field that updates
automatically everytime you access the table.

example: I have field that captures the meeting date of a topic. In my
other field I want the result "yes" or "no" to be updated when the meeting
date is equal to or prior to todays date.

first, how do you create a field that compares the two and automatically
populates that field with a yes or no.

second, each time the database is accessed and records are retrieved, I need
that field to update automatically.

This field should NOT exist in your table, at all. As you have
realized, it does not have a stable value - it will change from yes to
no as time goes on.

Rather than storing it in a Table, calculate it dynamically in a
Query.

Create a Query based on your table, and type:

[MeetingPassed]: ([MeetingDate] <= Date())

This value will be Yes or No as appropriate, no matter when the
meeting date or today's date might be.

You can base a Form or Report on this query just as easily as on the
table.

Note that you should always use a Form for viewing or editing data -
not your table datasheet.

John W. Vinson[MVP]
 
Top