Stephen Bond
stephen at bondsoftware.co.nz
Mon Aug 18 00:12:35 CDT 2003
I am converting a 2000 mdb to a 2002 mdb. In the 2000 version I have a form with a DataGrid control on it. (OLE class = DataGrid). It is unbound, and loaded at form open using an ADO recordset. In 2000 it works well. In 2002 I am getting 'run-time error 438, Object doesn't support this property or method'. It falls over on the last line of this code snippet: <code> Sub FillGridSpecificJobObservations(ByVal pk) Dim strSQL As String Set rs = New ADODB.Recordset Set rs.ActiveConnection = CurrentProject.Connection rs.CursorType = adOpenStatic rs.LockType = adLockReadOnly rs.CursorLocation = adUseClient strSQL = "SELECT qryEquipmentRegisterRHS.JobId, " & _ "qryEquipmentRegisterRHS.ObservationId AS ObsId, " & _ "qryEquipmentRegisterRHS.ObserverName AS ObservName, " & _ "qryEquipmentRegisterRHS.ObserverDate AS ObservDate, " & _ "qryEquipmentRegisterRHS.ObserverTime AS ObsTime, " & _ "qryEquipmentRegisterRHS.SorU, " & _ "qryEquipmentRegisterRHS.Id" strSQL = strSQL & " FROM qryEquipmentRegisterRHS " strSQL = strSQL & " WHERE qryEquipmentRegisterRHS.JobId = " & pk & ";" rs.Open strSQL rs.Sort = "ObsId Asc" SortAsc = True Set Me!DataGridSpecificJobObservations.DataSource = rs </code> where DataGridSpecificJobObservations is the name of the ActiveX control (DataGrid) Any takers .......? Stephen Bond Otatara, South Island, New Zealand