Vanishing Nested IIf function. (1 Viewer)

LOUISBUHAGIAR54

Registered User.
Local time
Yesterday, 22:34
Joined
Mar 14, 2010
Messages
157
Hello,

I am having a very strange difficulty with inserting a nested IIf function in a query field. This IIf function contains two user defined functions inside.

It runs as follows.


Vacation:IIf(IsNull([EntryTime] AND IsNull([FinishTime]),VacationHrs([Roster],[JobTitle],[TypeOfEmployment]),IIf(Not IsNull([EntryTime] AND Not IsNull([FinishTime]),PartVacationHrs([Roster],[JobTitle],[EntryTime],[FinishTime],[meta]),0)

The strange thing is that while each individual User defined function (VacationHrs and PartVacationHrs) works fine in isolation, the nested IIf function does not seem to hold within the query. ie. When I save the query it saves fine but when I check it again in its space in design view it does not ' hold' and I find a previous useless version of the IIf function.

More strange is the fact that access seems to remember the previous 'useless' IIf statement when it appears that it has already saved the IIf funcition I want inserted. :banghead:


Has anyone got an explanation for this problem? I hope I will find an answer or a clue. Many thanks.


Louis Buhagiar
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 22:34
Joined
Aug 30, 2003
Messages
36,126
I've seen that happen if the syntax was off. Offhand, you didn't close off the first IsNull() function in a couple of places.
 

Users who are viewing this thread

Top Bottom