#Name? error

R

Ran BD

=IIf(IsNull([Lease_Period]),Null,DateAdd("m",[ Lease_Period],[
Lease_Period_Start_Date]))

any ideas ?

thanks
 
W

Wayne Morgan

There is a space between the [ and the L in the second Lease_Period, but I don't expect
this to be it.

Are the names Lease_Period and Lease_Period_Start_Date the names of fields, controls, or
both? If the answer is both, try changing the names of the controls. For example, if the
name of the control that has Lease_Period as its control source is a textbox, try changing
it to txtLease_Period. Access sometimes gets lost if you have 2 items with the same name.
The name of the control is on the Other tab of the Properties sheet.
 
R

Ran BD

I've done that and it still doesn't work, any other ideas on how to
eliminate a recalculated error msg on a field ?
I have a field (A)lease_period, and field (B) lease_start_Date field (C) is
an unbound field calculating the end of the lease period if I'll use dateadd
function the result would be an error displayed on the field until I'll
enter the values for the fields.
how do I eliminate that msg ?

thanks

Wayne Morgan said:
There is a space between the [ and the L in the second Lease_Period, but I don't expect
this to be it.

Are the names Lease_Period and Lease_Period_Start_Date the names of fields, controls, or
both? If the answer is both, try changing the names of the controls. For example, if the
name of the control that has Lease_Period as its control source is a textbox, try changing
it to txtLease_Period. Access sometimes gets lost if you have 2 items with the same name.
The name of the control is on the Other tab of the Properties sheet.

--
Wayne Morgan


Ran BD said:
=IIf(IsNull([Lease_Period]),Null,DateAdd("m",[ Lease_Period],[
Lease_Period_Start_Date]))

any ideas ?
 
W

Wayne Morgan

Ok, I take it that it works once the field are filled in, the problem is only when there
are empty.

In that case, try an IIf statement as well.

=IIf(IsNull([Lease_Period]) Or IsNull([Lease_Start_Date]), "", DateAdd(your dateadd
statement))
 

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

Similar Threads


Top