Hi,
When I try adding a sort to my adodb, I am getting an error, 'Wrong number of arguments or invalid property assignment'. I have checked all over for examples and can't seem to resolve this. The error occurs with the sort. Will someone point out what I am doing incorrectly?
Thanks,
Tim
Tim Rutherford
When I try adding a sort to my adodb, I am getting an error, 'Wrong number of arguments or invalid property assignment'. I have checked all over for examples and can't seem to resolve this. The error occurs with the sort. Will someone point out what I am doing incorrectly?
Thanks,
Tim
Code:
set rst = CreateObject("ADODB.recordset")
rst.CursorLocation = adUseClient
rst.Fields.Append "Dept", adChar,4
rst.Fields.Append "Location", adChar,3
rst.Fields.Append "Fund", adChar,3
rst.Fields.Append "EmpID", adChar,7
rst.Fields.Append "EmpName", adChar,30
rst.Fields.Append "Date", adDate
rst.Fields.Append "Hours", adDecimal
rst.Fields.Append "HourNumber", adChar,4
rst.Fields.Append "GLKey", adChar,10
rst.Fields.Append "GlObj", adChar,10
rst.Fields.Append "NumberOfHours", adDecimal
rst.Open
rst.Sort "Fund,Dept,Location,Globj,EmpName"
'Tried using the following as well and it didn't work either
'rst.Sort "Fund Asc,Dept Asc,Location Asc,Globj Asc,EmpName Asc"
Tim Rutherford