i'm pretty new with access vba, i've written this small piece of code, but got Type mismatch error on this sentence,
"Set rs = dbs.OpenRecordset(sql)",
couldn't figure out why this is happening. that's the code below
sub query
Dim sql As String
Dim rs As Recordset
Dim dbs As Database
Set dbs = CurrentDb
sql = ""
sql = "SELECT * FROM Creditor"
Set rs = dbs.OpenRecordset(sql)
rs.Close
dbs.Close
end sub
just cann't fix it, any body can help me?
"Set rs = dbs.OpenRecordset(sql)",
couldn't figure out why this is happening. that's the code below
sub query
Dim sql As String
Dim rs As Recordset
Dim dbs As Database
Set dbs = CurrentDb
sql = ""
sql = "SELECT * FROM Creditor"
Set rs = dbs.OpenRecordset(sql)
rs.Close
dbs.Close
end sub
just cann't fix it, any body can help me?