Hey Guys, The Sys Admin is having some problems with some Access/VB code. It wasnt our choice of language/database, but we have to fix up the fuckup from the previous people. What we are trying to do is loop through all the labels, and getting the sum of them. However, val() is treating Temp as a string, instead of an object. We have tried type casting, to no avail, and I dont use VB/Access to know what is going, since I'm the PHP/Java dev, and only used VB/Access back in 1st year university for 1 RAD course. Anyways, here is the code (variable names have been changed for reasons): Code: Function ValLoop(LineStart As Integer, LineEnd As Integer, LabelStart As String, LabelEnd As String) As Double Dim Total As Double Dim Temp As String Total = 0 Do While (LineStart <= LineEnd) Temp = LabelStart & LineStart & LabelEnd & ".Caption" Total = Total + Val(Temp) LineStart = LineStart + 1 Loop ValLoop = Total End Function An examle of the Temp would be: "LBL2E4.Caption" It should run Val(LBL2E4.Caption) but its running Val("LBL2E4.Caption") Any suggestions? TIA!