I myself use recordset and find them to be fast and simple to work with. The key is to create the SQL statement. Wait one Access can make this simple for you create a query and cut out the SQL from it and paste into the statement. You can use program control to change the string as needed to get what you need. The following code might help:Dim rs As RecordsetDim db As DatabaseDim sDataBase As StringDim sData As String sDataBase= "C:pathfilename.mdb" Set db = DBEngine(0).OpenDatabase(sDataBase) sData= "SELECT....." 'The SQL statement Set rs = db.OpenRecordset(sData) If rs.EOF Then rs.Close Exit Sub End If rs.MoveFirst Do Until rs.EOF'Add code to use the record here rs.MoveNext Loop rs.CloseURL:617.html
It looks like you're new here. If you want to get involved, click one of these buttons!