URGENTE , modificar subformulario con var obj
Publicado por vlg (30 intervenciones) el 09/01/2004 09:49:50
Tengo un grave problema deseo modificar un subformulario con un nuevo contenido recuperado mediante una variable objeto , el codigo es el siguiente :
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
'Use the ADO connection that Access uses
Set cn = CurrentProject.AccessConnection
'Create an instance of the ADO Recordset class,
'and set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = "SELECT * FROM CARAT"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
Set Me.Secundario9.Form.RecordSource = rs
'Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing
Este procedimiento me da error , alguien me puede guiar ya que ando un poco perdido , MUCHAS GRACIAS
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
'Use the ADO connection that Access uses
Set cn = CurrentProject.AccessConnection
'Create an instance of the ADO Recordset class,
'and set its properties
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = "SELECT * FROM CARAT"
.LockType = adLockOptimistic
.CursorType = adOpenKeyset
.Open
End With
'Set the form's Recordset property to the ADO recordset
Set Me.Secundario9.Form.RecordSource = rs
'Set Me.Recordset = rs
Set rs = Nothing
Set cn = Nothing
Este procedimiento me da error , alguien me puede guiar ya que ando un poco perdido , MUCHAS GRACIAS
Valora esta pregunta


0