display result from SQL Querry in txtbox

S

Supicek

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
 
O

Ofer

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")
 
S

Supicek

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")
 
Top