macro or calculation

A

accessnewbee

Afternoon,
I am new to access and am attempting to create my first database. What I
would like to accomplish is when a date is filled within one field, I would
like it to automatically fill in a different field with "yes". I am used to
Excel and this would be a fairly easy "if" statement, but I am struggling
with the move to access. Would this need to be a macro or calculation? If
so, how would I complete the task?

Thanks!!!
 
S

Steve Schapel

Newbee,

No, this does not require a macro. It is a calculation. If you mean that
the field you want to put the "yes" in is in a table, and if the value of
this field is always dependent on the entry in the date field, then you
should remove that field from the table - this is an invalid database
design. Hope your "un-learning" of spreadsheet concepts isn't too painful!
:)

Do you mean that you want "yes" if there is any data at all entered? Or do
you mean you want "yes" if it is a certain date, or within a certain date
range?

If the first, on your form or report you can put an unbound checkbox
control, and set its Control Source to the equivalent of this:
=[NameOfYourDateField] Is Not Null
Or if you literally want the text word "yes", put an unbound textbox
control, and set its Control Source to the equivalent of this:
=IIf(IsNull([NameOfYourDateField]),Null,"yes")
 

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