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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with IIF

Status
Not open for further replies.

007700

Programmer
Jan 24, 2005
20
NL
Hi there,

I am trying to get this to work in a textbox on the form.
I knwo it looks messy, and it might nog be according to standards but it's the only way I can think of to get it to work. The only thing is that I think (at least Access things it) that I am missing a "[" or a "("...
Any ideas what the problem might be ???

IIf ((((([Eind maand] - [Instalatie_datum] - [aantal_dagen_deze _maand])+1) <= [aantal_dagen_vorige_maand] );
IIf((([Eind maand] - [Instalatie_datum] - [aantal_dagen_deze _maand])+1) <= 0);0;
((([Eind maand]- [Instalatie_datum] - [aantal_dagen_deze _maand])+1) / ([aantal_dagen_vorige_maand]+1));
1) * [Lijnkosten] )

Thanks from Holland

Henri van den Heuvel
 
Please don't split your thread into two as far as your question is the same. Please follow up thread701-998013

Zameer Abdulla
Jack of Visual Basic Programming, Master in Dining & Sleeping
Visit Me
 
How are ya 007700 . . . . .

Here ya go . . . corrected save the last part in [purple]purple[/purple]. Its the [blue]false part of the first IIf[/blue]. You'll have to decide what you want to do with it.
Code:
[blue]IIF(([Eind maand]-[Instalatie_datum]-[aantal_dagen_deze _maand]+1)<=[aantal_dagen_vorige_maand], IIf(([Eind maand]-[Instalatie_datum]-[aantal_dagen_deze _maand]+1)<=0,0,([Eind maand]-[Instalatie_datum]-[aantal_dagen_deze _maand]+1)/([aantal_dagen_vorige_maand]+1)),[purple][b]1)*[Lijnkosten][/b][/purple])[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top