Form recordsource question

A

Alexis

How do I make the resulting recordset the recordsource of
a form? I have Access 2002, and I am a fairly beginner
programmer. Thanks

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)

Debug.Print rst.GetString
Set rst = Nothing
Set cnn = Nothing
End Function
 
T

Tim Ferguson

How do I make the resulting recordset the recordsource of
a form? I have Access 2002, and I am a fairly beginner
programmer.

Basically, you don't. The recordsource for a form is based on a query,
which could be a jet query, a table, a view or even a stored procedure. The
form itself handles all the opening and closing of the recordset.

I do not know enough about ADO to judge what you are trying to do here, but
it looks suspiciously like you are trying to assault the system tables. I
just wouldn't do that. If you want your users to have access to the schema,
then give them a copy of MS Query or Enterprise Manager or something that
is already designed for the purpose.

Best wishes


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top