Access 2002

A

AaronMPA

I have an Access database tracking CD-ROM distribution. Two of my fields are
as follows: 1 - Sent to user? (Yes/No data type using a check box to signify
of the CD was sent (check means yes, no check means not sent)); 2 - Date
Sent? (Date/Time data type). I also created a form for populating the
information. Is there a way to have the Date Sent be populated only when a
check is placed in the Sent to User field?
 
R

Rick B

Sure, put code in the checkboxes "after update" event that says, "If the
entry is true, then DateSent=Date()"
 
T

Tim Ferguson

Is there a way to have the Date Sent be populated only when a
check is placed in the Sent to User field?

Why bother? This structure is not in first normal form, since the Yes/No
field is dependent on the value of the DateSent field. If the DateSent
field is null, then the thing has not been sent.

Sooner or later you will get problems when there is a date in the field and
the Yes/No field says No. Or vice versa. Or (probably) both.

Just remove the Yes/No field and query on DateSent IS NULL or NOT NULL as
required.

Hope that helps


Tim F
 

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