Re: Displaying SQL results
There are many methods you can use.
I recommend you rewrite your SQL like this:
SELECT Average(wind_strength) AS Avg_Wind_Strength FROM Wind WHERE date = 'Jan'
I am not sure how you store the date record, but your statement "... WHERE date = 'Jan'" is so strange, is it valid?
If you set rst as recordset, then you can use either of the following:
txtAverage.Text = rst(0).Value
txtAverage.Text = rst("Avg_Wind_Strength").Value
txtAverage.Text = rst!Avg_Wind_Strength
txtAverage.Text = rst.Fields(0).Value
Re: Displaying SQL results
What kind of database is this?
Date is a reserved word and should not be used as a field name. This could be causing issues.
Re: Displaying SQL results
Thanks, i made up that database as an example - but I can see how to display the results from the first reply.
Thanks for the help
:)