Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word VBA Make Module Recordset Available To Form

Status
Not open for further replies.

Speccy

MIS
May 18, 2006
5
US
I have a recordset that is generated in a module and I need it to be made available to code running behind a form.

I have tried:

--Form Code

Public rsAuthor As ADODB.Recordset (declared on the form, not the module)
Public rsTypist As ADODB.Recordset (declared on the form, not the module)

--Module Code

With frmTelecopy
Set .rsAuthor = rsRecAuthor.Clone()
Set .rsPublisher = rsRecPublisher.Clone()
End With

------------------------------------------------------------------------------------------

I am using:

MsgBox rsAuthor.Fields("EmpNumber").Value to ping back a recodset value from the form but it doesn't work.

How do I make a recordset held in a module available to a form?
 



Hi,

CODE question ought to be posted in VBA Visual Basic for Applications (Microsoft) forum707

Please clarify between FORM (Word has FORM fields in the document) and UserForm constructed in VB Editor.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top