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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create subform with data NOT based on table or query

Status
Not open for further replies.

jflachman

Technical User
May 30, 2001
133
US
I have a form/subform. The form is set up with all the fields being unbound. When the user hits the Done button, the data is added to a new record in a table with VBA. This limits the possibilities for multi-user interference and other errors.
I want to have a subform with the same properties, I don't want any of the data bound to a table. I can populate the recordsets in VBA and do the other manipulation I need to do. However, I haven't been able to link the populated recordset and the subform so that the form displays the data in the recordset.
Code:
dim rst as recordset
...(open and populate recordset)
form.recordsource = rst
doesn't work.

Any suggestions? Jonathan
________________________________________
It is not fair to ask of others what you are unwilling to do yourself.
-Eleanor Roosevelt
 
I have recently done what you are asking about. I investigated the issue since I wanted to use a persistent XML file using ADO. Creating the recordset is no difficulty but couldn't determine how to use it in Access 97. I successfully used the following assignment in Access 2000 in the Form_Load event:

Me.RecordSet = MyADO_Recordset

Try Dim rst As ADODB.Recordset and then create the recordset. It should be able to be assigned. Did you verify that the recordset contained records?

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top