A
Alexis
I am fairly new to writing codes, I get an error
saying "type mismatch" when I try setting the recordset of
a form. This is my code, can someone help.
Function ReturnUserRoster()
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset
Dim frm As Form
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=\\us504s47\e\PBSGDATA\Secure.mdw"
Set rst = cnn.OpenSchema(adSchemaProviderSpecific _
, , JET_SCHEMA_USERROSTER)
Set frm = Forms!who
frm.RecordSource = rst
Set rst = Nothing
Set cnn = Nothing
End Function
saying "type mismatch" when I try setting the recordset of
a form. This is my code, can someone help.
Function ReturnUserRoster()
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset
Dim frm As Form
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=\\us504s47\e\PBSGDATA\Secure.mdw"
Set rst = cnn.OpenSchema(adSchemaProviderSpecific _
, , JET_SCHEMA_USERROSTER)
Set frm = Forms!who
frm.RecordSource = rst
Set rst = Nothing
Set cnn = Nothing
End Function