Hi
Can anyone help me with this code?? I'm having a problem setting my recordset to a subform with my ADODB connection. Heres my code, and my error is on the highlighted line:
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim fld As ADODB.Field
Dim sql As String
Set conn = New ADODB.Connection
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=robert-ch; DATABASE=cslogcalls; UID=root;PWD=epos5;OPTION=3"
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseServer
rs.Open "SELECT DesignCode, Range, Module from designs where Range = '" & range & "'", conn, , adLockOptimistic
Forms!frmAddRange!frmSubRange.Form.Recordset = rs
and the error i get it:
Run-time error '438':
Object doesn't support this property or method
Any help at all is much appreciated!
Dee
Can anyone help me with this code?? I'm having a problem setting my recordset to a subform with my ADODB connection. Heres my code, and my error is on the highlighted line:
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim fld As ADODB.Field
Dim sql As String
Set conn = New ADODB.Connection
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=robert-ch; DATABASE=cslogcalls; UID=root;PWD=epos5;OPTION=3"
conn.Open
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseServer
rs.Open "SELECT DesignCode, Range, Module from designs where Range = '" & range & "'", conn, , adLockOptimistic
Forms!frmAddRange!frmSubRange.Form.Recordset = rs
and the error i get it:
Run-time error '438':
Object doesn't support this property or method
Any help at all is much appreciated!
Dee