Hi Graham
Here it is
Thanks
SELECT Tbl_Residents.ID, Tbl_Homes.[Name Of Home],
Tbl_Residents.[Patient First Name], Tbl_Residents.Surname,
[Forms]![Frm_Payment_Adjustments_Calculations]!
[Cmb_Payment_From] AS [Start date], [Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb_Payment To] AS
[Start Date End], [Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb Start Rate] AS
[Rate Start], [Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb_End_Rate] AS
[Rate End], [Forms]![Frm_Payment_Adjustments_Calculations]!
[Cmb_Payment_From_New_Rate] AS [End Start Date], [Forms]!
[Frm_Payment_Adjustments_Calculations]!
[Cmb_Payment_to_New_rate] AS [End End Date], [Start Date
End]-[Start date]+1 AS [Number of Days at Start], [End End
Date]-[End Start Date]+1 AS [Number of days at End],
[Number of Days at Start]*[Rate Start] AS [Paid at Start],
[Number of days at End]*[Rate End] AS [Should have Paid],
[Should have Paid]-[Paid at Start] AS [Difference to Pay],
[Forms]![Frm_Payment_Adjustments_Calculations]![Check
Continence Payment] AS [Continenece Payment 1], IIf
([Continenece Payment 1]=-1,[Number of Days at Start]
*0.66,0) AS [Continence Paid], [Forms]!
[Frm_Payment_Adjustments_Calculations]!
[Check_Continence_New_Rate] AS [Continence Payment2], IIf
([Continence Payment2]=-1,[Number of days at End]*0.66,0)
AS [Continence to Pay], [Continence to Pay]-[Continence
Paid] AS [Continence Payment Difference], [Difference to
Pay]+[Continence Payment Difference] AS [Total Adjustment
to Pay], [Forms]![Frm_Payment_Adjustments_Calculations]!
[Cmb_Payment_Code] AS [Payment Type], [Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb_Payment Run]
AS [Payment Run], [Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb_] AS Rate
FROM Tbl_Homes INNER JOIN Tbl_Residents ON Tbl_Homes.[Name
Of Home] = Tbl_Residents.Home
WHERE (((Tbl_Residents.ID)=[Forms]!
[Frm_Payment_Adjustments_Calculations]![Cmb_Surname]));
Saladin
-----Original Message-----
Saladin,
<<can you be more specific please?>>
"I have designed a query that uses a combo..."
Open the query in design view. Then under the File menu, click the arrow
next to the View toolbar button. When the list drops- down, select SQL. Copy
what you see there into your next post.
Graham R Seach
Microsoft Access MCP, MVP
Sydney, Australia
.