A
Alain
Hi,
scenario: I have a query that returns multiple same id with a specific spaceno
(id=1 and spaceno = 1, id = 1 and spaceno = 2, id = 1 and spaceno = 3 and so
on)
each spaces has different rent values
I can manage to apply the required amount to spaceno 1 if it's in the
results,
park: iif(spaceno = 1 then park,"").
My problem is if spaceno 1 is not in the results, I need to apply the
required amount to spaceno2 and if spaceno 1 and 2 does not exists then it
need to be applied to spaceno3 ......
I have tried many different ways to get to the results I need but no
success, the closest is the following:
Parking2:
IIf([basicrental].[spaceno]=DMin("spaceNo","Q-BasicRentalSpaceNo","IdBranch =
basicrental.idbranch"),[Park])
The DMin does return the right value I need but it does not show on my
spaceno2 since for this specific idbranch, spaceno1 does not exists.
Can anyone help?
Thanks
Alain
scenario: I have a query that returns multiple same id with a specific spaceno
(id=1 and spaceno = 1, id = 1 and spaceno = 2, id = 1 and spaceno = 3 and so
on)
each spaces has different rent values
I can manage to apply the required amount to spaceno 1 if it's in the
results,
park: iif(spaceno = 1 then park,"").
My problem is if spaceno 1 is not in the results, I need to apply the
required amount to spaceno2 and if spaceno 1 and 2 does not exists then it
need to be applied to spaceno3 ......
I have tried many different ways to get to the results I need but no
success, the closest is the following:
Parking2:
IIf([basicrental].[spaceno]=DMin("spaceNo","Q-BasicRentalSpaceNo","IdBranch =
basicrental.idbranch"),[Park])
The DMin does return the right value I need but it does not show on my
spaceno2 since for this specific idbranch, spaceno1 does not exists.
Can anyone help?
Thanks
Alain