Queries and combo boxes

  • Thread starter Thread starter Saladin
  • Start date Start date
S

Saladin

Hi

In Access 2000
I have designed a query that uses a combo box value as a
parrameter. The combo box is in A form.

Until recently, the query would display the value (date)
in the results when run. It now does not display the
results. However, the value in the combo is used for a
calculation, and the calculation is displayed, but not the
combo box value.

Has anyone come across this type of problem and has it
been resolved.

Many Thanks

Sal
 
Saladin,

Show us the query.

Graham R Seach
Microsoft Access MCP, MVP
Sydney, Australia
 
Graham
Thank you for getting back to me. Show you the query? can
you be more specific please?

Cheers
 
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
 
Saladin,

I can see nothing wrong with your query. The only thing I could question is
whether you've entered the combo names correctly. For example,
[Cmb_Payment To]
[Cmb Start Rate]

Do these need to have underscores in their names, because all the other
controls seems to.

Graham R Seach
Microsoft Access MCP, MVP
Sydney, Australia


saladin said:
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





.
 
Back
Top