Hi,
I have a database which contains, amonst others, two fields;
(1) Treatment_provided - a YES/NO response being required.
(2) Number_of_days_of_treatment - a number field
When first opening the data entry form I would like a default value of "NO" in the Treatment_provided field, and the Number_of_days_of_treatment field to be disabled. Once Treatment_provided has been changed to "YES" I then want the Number_of_days_of_treatment field to become enabled,allowing me to enter a value. If the Treatment_provided field is then later changed back to "NO" I would like the Number_of_days_of_treatment field to clear and return to it's disabled state.
I can just about do this, but when I later review the data I have entered (having previously closed-down and re-opened the data-entry form) the Number_of_days_treatment field is greyed out, even on those records where Treatment_provided is "YES". The number values in the Number_of_days_of_treatment still remain however.
Does anyone know how to make sure that the Number_of_days_of_treatment field stays enabled even after the form has been closed and then re-opened for those records with "YES" in the Treatment_provided field? The Number_of_days_of_treatment field currently is defaulted to 'not enabled' and the Treatment_provided field defaults to "NO".
Does anyone know the VB code I might use to solve this problem? I appreciate that I may not have explained the problem well enough, so please let me know if you need further explanation.
If someone can help, that'd be great!
Thanks.
Best regards
Russell
Usr33t
I have a database which contains, amonst others, two fields;
(1) Treatment_provided - a YES/NO response being required.
(2) Number_of_days_of_treatment - a number field
When first opening the data entry form I would like a default value of "NO" in the Treatment_provided field, and the Number_of_days_of_treatment field to be disabled. Once Treatment_provided has been changed to "YES" I then want the Number_of_days_of_treatment field to become enabled,allowing me to enter a value. If the Treatment_provided field is then later changed back to "NO" I would like the Number_of_days_of_treatment field to clear and return to it's disabled state.
I can just about do this, but when I later review the data I have entered (having previously closed-down and re-opened the data-entry form) the Number_of_days_treatment field is greyed out, even on those records where Treatment_provided is "YES". The number values in the Number_of_days_of_treatment still remain however.
Does anyone know how to make sure that the Number_of_days_of_treatment field stays enabled even after the form has been closed and then re-opened for those records with "YES" in the Treatment_provided field? The Number_of_days_of_treatment field currently is defaulted to 'not enabled' and the Treatment_provided field defaults to "NO".
Does anyone know the VB code I might use to solve this problem? I appreciate that I may not have explained the problem well enough, so please let me know if you need further explanation.
If someone can help, that'd be great!
Thanks.
Best regards
Russell
Usr33t