Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, I am trying to get a Yes

Status
Not open for further replies.

Neoduder

Technical User
Feb 24, 2003
10
US
Hi all,

I am trying to get a Yes/No field in one of my tables to automatically change depending on todays date being earlier or later than another date field in the same record. Can anyone give me a rough idea of how to do this?

Thanx in advance
 
Hello Neoduder,
 Here are the problems with the above scenario:

1) If the date never changes, then there is no reason to store the Y/N value because this would essential be a "calculated value", which could be determined on the fly at any time -- hence I is redundant.

2) If the date can change then you have the same problem, however this time you must ensure that the Y/N field gets updated at the same time, otherwise your data will not be correct. This is not a good situation.

3) If the date can change, but you only want to display the Y/N field to reflect the first date that the user ever enters into this field, then should be saving the dates in a history table. Otherwise nobody can trace back the Y/N value to see why it is 'Yes' or 'No'.

So, In the latter scenario you would not want to store the Y/N value because you can still calculate the Y/N result from the history table.

The best design practice dictates that you would not want to store this value.
Good Luck, Robert
•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•
Professional, affordable, Access database solutions and assistance °•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°
 
Cheers,

I think I got it working. The databse that I am designing is to store training records and I was needing the Yes/No field to show if the training had been completed or was still scheduled. I eventually got there by using a Query with a calculated field. Thanx for the help anyway though.
 
So you are STILL storing redundent data in your table - as Robert pointed out in para 1 above it is a BAD idea.


G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top