Date + 10

H

Hank Stalica

Ok, I have three fields. FieldA, FieldB, and FieldC. FieldA has a
date. If FieldB is null, I would like FieldC to = FieldA + 30 days.

Can someone point me in the right direction to do this?

Thanks,

--Hank
 
F

fredg

Ok, I have three fields. FieldA, FieldB, and FieldC. FieldA has a
date. If FieldB is null, I would like FieldC to = FieldA + 30 days.

Can someone point me in the right direction to do this?

Thanks,

--Hank

Having Field A and FieldB is Fine. FieldC is not needed.

Using a form that includes controls bound to FieldA and FieldB, you
would then add a third, unbound control.
Set it's Record source to:
=IIf(IsNull([FieldB]),[FieldA]+30,"")

This value need not be stored. Whenever you need the value, use the
same expression in an unbound control, in a Report, or a similar
expression in a Query.
 
G

Guest

Hank said:
Ok, I have three fields. FieldA, FieldB, and FieldC. FieldA has a
date. If FieldB is null, I would like FieldC to = FieldA + 30 days.

Can someone point me in the right direction to do this?

Thanks,

--Hank

Look at access help file on DateAdd function.
gm
 
H

Hank Stalica

Sorry..in a form.

FieldA shows the end date for an auction. FieldB is the ship date.
FieldC is the relist date. I want FieldC to show FieldA+10 if FieldB is
empty.

--Hank
 
H

Hank Stalica

That works PERFECTLY.

Thank you.

--Hank

Ok, I have three fields. FieldA, FieldB, and FieldC. FieldA has a
date. If FieldB is null, I would like FieldC to = FieldA + 30 days.

Can someone point me in the right direction to do this?

Thanks,

--Hank


Having Field A and FieldB is Fine. FieldC is not needed.

Using a form that includes controls bound to FieldA and FieldB, you
would then add a third, unbound control.
Set it's Record source to:
=IIf(IsNull([FieldB]),[FieldA]+30,"")

This value need not be stored. Whenever you need the value, use the
same expression in an unbound control, in a Report, or a similar
expression in a Query.
 

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