Æ
文仔
When I exe the recordset VBA program the line one was
Dim dbo as Database
the computer show to me was error
Why?
Dim dbo as Database
the computer show to me was error
Why?
文仔 said:Thanks a lot
next problem, was show as follows, please help!!!
Private Sub Command0_Click()
Dim dbo As Database
Dim rst As Recordset
Dim strsql As String
Set dbo = CurrentDb
strsql = "Select *. from table1"
Set rst = dbo.OpenRecordset(strsql)
rst.Sort = "field1 Desc"
rst.Filter = "[field1] like '*y*'"
Set rst = rst.OpenRecordset <-----Show compile error
With rst
.MoveFirst
Do While Not .EOF
Debug.Print ![Field1]
.MoveNext
Loop
.Close
End With
dbo.Close
Set dbobject = Nothing
End Sub
Allen Browne said:Add a reference to the DAO library appropriate to your version of Access:
http://allenbrowne.com/ser-38.html