I receved error whin i convert my access form from access 2003 to access 2010 .accdb
Erorr in this line (Set rst = DBS.OpenRecordset("Accounts", dbOpenDynaset))
Please Support
-----------------------------------------------------------
code
-----------------------------------------------------------
Private Sub Form_Load()
Dim DBS As Database
Dim rst As Recordset
Dim nodX As Node
Set DBS = CurrentDb
Set rst = DBS.OpenRecordset("Accounts", dbOpenDynaset)
Set nodX = TreeView1.Nodes.Add(, , "A", "دليل الحسابات")
With rst
Do While Not .EOF
Set nodX = TreeView1.Nodes.Add("A" & CStr(Nz(!ParAcc)), tvwChild, "A" & CStr(!AccID), CStr(!AccID) & ":" & !ArAccDes)
nodX.EnsureVisible
.MoveNext
Loop
End With
rst.Close
Set DBS = Nothing
For Each nodX In TreeView1.Nodes
nodX.Expanded = False
nodX.Sorted = True
Next
End Sub