Capturing Automatic Yes or No Field Result

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

A form with a field name StartDate, EndDate & ExpiredDate. The control
source for ExpiredDate is set as =[EndDate]=Date()=True. This provides me
with the desired result. The issue is the table field name ExpiredDate is not
being updated with a check mark; it is a Yes or No field. I read some
inquiry on updating a table with a check box, but unable to derive a
solution. I am using Access 2003, Window XP Professional; I greatly
appreciate your assistance.
 
A form with a field name StartDate, EndDate & ExpiredDate. The control
source for ExpiredDate is set as =[EndDate]=Date()=True. This provides me
with the desired result. The issue is the table field name ExpiredDate is not
being updated with a check mark; it is a Yes or No field. I read some
inquiry on updating a table with a check box, but unable to derive a
solution. I am using Access 2003, Window XP Professional; I greatly
appreciate your assistance.

I'm not sure I understand. A Yes/No field is stored as -1 for
Yes/True/Checked, 0 for No/False/Unchecked. The *display control* can be a
textbox (-1, Yes, or True), a combo box (Yes, or actually anything you want),
or a checkbox (checked); but a table does not contain a checkbox.

You should probably not be trying to store this yes/no field in any case. If
it's True today, you can be ABSOLUTELY CERTAIN that it will be false tomorrow
- and if you store it in the table it will then be *wrong*.
 
If the purpose of ExpiredDate is to show if EndDate has been reached or
passed an unbound check box in a form or report with a ControlSource property
of:

=[EndDate]<=Date()

would do. Or a computed column in a query:

Expired:[EndDate]<=Date()

If its purpose is to show that the current date is EndDate then your current
expression is all that's needed (you don't need to include '=True' BTW).

Either way there is no need for an ExpiredDate column in the table.

Ken Sheridan
Stafford, England
 
Thank you very much, you are correct on many fronts, the ExpiredDate column
is not required, a text box did solve that issue. To obtain the desire
result, I place a line of VB Code in the report footer on format event
indicating If Me. EndDate > Now().
--
Tim


Ken Sheridan said:
If the purpose of ExpiredDate is to show if EndDate has been reached or
passed an unbound check box in a form or report with a ControlSource property
of:

=[EndDate]<=Date()

would do. Or a computed column in a query:

Expired:[EndDate]<=Date()

If its purpose is to show that the current date is EndDate then your current
expression is all that's needed (you don't need to include '=True' BTW).

Either way there is no need for an ExpiredDate column in the table.

Ken Sheridan
Stafford, England

Tim said:
A form with a field name StartDate, EndDate & ExpiredDate. The control
source for ExpiredDate is set as =[EndDate]=Date()=True. This provides me
with the desired result. The issue is the table field name ExpiredDate is not
being updated with a check mark; it is a Yes or No field. I read some
inquiry on updating a table with a check box, but unable to derive a
solution. I am using Access 2003, Window XP Professional; I greatly
appreciate your assistance.
 

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

Back
Top