I am getting really MAD now. It's been Hours that I am working on this and searching on google for anything but No answer!!!
Can someone please tell me how to Do a search using Dao Recordset like we do in VB6? Here is the code I have in a module
Here is my problem. The databse is opened correctly but when it comes to the line RS = DB.OpenRecordset it tells me that I need to create a New instance of the object RS. HOW DO WE DO THAT!!!!Code:Public WS as dao.Workspace Public DB as dao.Database Public RS as dao.Recordset Public Sub SearchInDatabase(ByVal sSearch as string) Dim sSQL As String ... DB = WS.OpenDatabase("{MDB_FilePath}") sSQL = "SELECT * FROM {Table} WHERE {FieldName} LIKE '*{Value}*'" RS = DB.OpenRecordset(sSQL) Do While Not RS.EOF ... Loop ... End Sub
I'm sorry for the capitals but after hours of search and head scratching I gave up and posted here!
Please, someone help me! AND NO, I don't want to use ADO or any other. I want to know how to use DAO like VB6!
Thank you in advance for your help!




Reply With Quote
