Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error for date field in IIF control source 1

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
213
BE

Hi

I entered the following as control source for a textbox:
Code:
=IIf([IsSold]<>0;[pro_SaleDate];'X')
If 'IsSold' = 0, I get X, and that's good.
but the problem is, that if 'IsSold' <> 0, I am getting an error instead of a date.
I really don't know why. Can somebody please tell me?

note: i have tried to put a textbox bounded direct to the field 'pro_SaleDate', and it worked good.

Thanks, Ja
 
Is the control called pro_SaleDate? If so, rename it and see if that works.
 

You are GREAT Remou,

I did your suggestion and it worked fantastic.

[Only, I had to re-fix what access does for me. because when I added "txt_" to the textbox name, access was 'smart' and added the same to the "field name" in the control source expression.]

Thanks a lot, Ja


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top