A
Ange Kappas
Hi All,
I've progressed a filter in a query of mine TODAY CHARGES to
lookup up records according to the following SQL:
SELECT RUNDATE.DATE, RESPEL.ROOMNO, RESPEL.SURNAME, RESPEL.NAME,
RESPEL.COMPANY, PRICELIST.PRICE, RESPEL.ARRIVAL, RESPEL.DAYS,
RESPEL.DEPARTURE, RESPEL.PRICELIST, RESPEL.TYPECHARGE, RESPEL.RESNO,
RESPEL.RESNAME, RESPEL.STATUS
FROM RUNDATE, RESPEL INNER JOIN PRICELIST ON RESPEL.PRICELIST =
PRICELIST.CATEGORY
WHERE (((RUNDATE.DATE)>=[PRICELIST]![START] And
(RUNDATE.DATE)<=[PRICELIST]![END]) AND
((RESPEL.DEPARTURE)>(SELECT[DATE]FROM[RUNDATE])) AND ((RESPEL.STATUS)="IN")
AND (([RESPEL]![COMPANY])=[PRICELIST]![COMPANY] And
([RESPEL]![COMPANY])=[PRICELIST]![COMPANY]) AND
(([RESPEL]![TYPECHARGE])=[PRICELIST]![CHARGE] And
([RESPEL]![TYPECHARGE])=[PRICELIST]![CHARGE]));
What I want to do either in Design View or adding something to the above SQL
is:
When in the RESPEL.PRICELIST is NULL to place in the field PRICELIST.PRICE
of the Query TODAY CHARGES the value from the table RESPEL.DAILY CHARGE.
In other words if the field PRICELIST in the Table RESPEL does not have a
value not to lookup the value from the price list as it does in the above
SQL but to take the value from the table RESPEL from the field DAILY CHARGE.
Much Appreciated if someone can help me on this.
It's probably quite a simple inclusion in the Design View on the field
PRICELIST.PRICE in the criteria section, but I need someone to push me in
the right direction.
Thanks
Ange
I've progressed a filter in a query of mine TODAY CHARGES to
lookup up records according to the following SQL:
SELECT RUNDATE.DATE, RESPEL.ROOMNO, RESPEL.SURNAME, RESPEL.NAME,
RESPEL.COMPANY, PRICELIST.PRICE, RESPEL.ARRIVAL, RESPEL.DAYS,
RESPEL.DEPARTURE, RESPEL.PRICELIST, RESPEL.TYPECHARGE, RESPEL.RESNO,
RESPEL.RESNAME, RESPEL.STATUS
FROM RUNDATE, RESPEL INNER JOIN PRICELIST ON RESPEL.PRICELIST =
PRICELIST.CATEGORY
WHERE (((RUNDATE.DATE)>=[PRICELIST]![START] And
(RUNDATE.DATE)<=[PRICELIST]![END]) AND
((RESPEL.DEPARTURE)>(SELECT[DATE]FROM[RUNDATE])) AND ((RESPEL.STATUS)="IN")
AND (([RESPEL]![COMPANY])=[PRICELIST]![COMPANY] And
([RESPEL]![COMPANY])=[PRICELIST]![COMPANY]) AND
(([RESPEL]![TYPECHARGE])=[PRICELIST]![CHARGE] And
([RESPEL]![TYPECHARGE])=[PRICELIST]![CHARGE]));
What I want to do either in Design View or adding something to the above SQL
is:
When in the RESPEL.PRICELIST is NULL to place in the field PRICELIST.PRICE
of the Query TODAY CHARGES the value from the table RESPEL.DAILY CHARGE.
In other words if the field PRICELIST in the Table RESPEL does not have a
value not to lookup the value from the price list as it does in the above
SQL but to take the value from the table RESPEL from the field DAILY CHARGE.
Much Appreciated if someone can help me on this.
It's probably quite a simple inclusion in the Design View on the field
PRICELIST.PRICE in the criteria section, but I need someone to push me in
the right direction.
Thanks
Ange