Hi all,

In the below code am unable to retrieve data from the Ms access tabel.The query is not executed(runtime error 440). Could you please tell me where i have done the mistake.

Dim l_strConn
Dim g_objConn as object
Dim l_rsRunData as object
Dim l_strRunSQL as string

l_strConn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\Program Flies\CSA\Testdata

Set g_objConn = CreateObject("ADODB.Connection")
g_objConn.Mode = 3
g_objConn.open l_strConn
l_strRunSQL = "Select * from accounts where Acc_Number = '123456' "

msgbox l_strRunSQL

Set l_rsRunData = g_objConn.Execute(l_strRunSQL)

msgbox l_rsRunData