display result from SQL Querry in txtbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me how to display in the txtbox a result from SQL querry
querry returns just a single value:

SELECT sum(orPrice) from tbOrders
 
In the TextBox Control Source property you can use DlookUp

If this is the SQL
SELECT sum(orPrice) As SumOfPrice from tbOrders

Then
=DLookUp("SumOfPrice","QueryName")
============================
Or you can skip the Query, and write
=Dsum("orPrice","tbOrders")
 
thanks DSUM was what i was looking for
:)

Ofer said:
In the TextBox Control Source property you can use DlookUp

If this is the SQL
SELECT sum(orPrice) As SumOfPrice from tbOrders

Then
=DLookUp("SumOfPrice","QueryName")
============================
Or you can skip the Query, and write
=Dsum("orPrice","tbOrders")
 
Back
Top