debug.print adoTriTemps.Recordset!Temps and you'll see why it doesn't work
"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
Then try to debug.printinate the values from the recordset.
"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
desprits:
in
test = (Format(TotalTempsUtilisation, "0.00000000" + Format(adoTriTemps.Recordset!TempsUtilisation, "0.00000000")
you are again trying to add to strings.
What you want to do is add date- or numeric values.
1) The data item "Temps" in the DBMS record set must have a data type of either "Text" (and the data contained in that item must be of the correct format (eg 10:25pm)) OR it must be of type Date/Time.
2) Given that the above is true, then the code as jel wrote will work correctly:
Then do this:
TotalTemps = TimeValue("00:23" + TimeValue("00:11" + TimeValue("01:51"
MsgBox TotalTemps
If you were to check, you would see that adoTriTemps.Recordset!Temps is returning something that is not a valid time.
"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.