|
 |
access thread: Unbound subforms
Message #1 by "Jason Bradford" <j.bradford@a...> on Mon, 25 Jun 2001 12:10:12
|
|
I am having difficulty populating an unbound subform using an ADO
recordset. I have created a complex database used to monitor the
processes an order has to go through. There is a main form that displays
the order date, customer name, address and delivery address. This is an
unbound form and is populated using an ADO recordset. The subform is
linked to the main form by the order reference number. The link works
fine as the subform data does relate to the main form order number.
However the problem is displaying all the records on the subform. I can
only get the subform to display a single record. The properties of the
form are set to continuous form and I expect to see a list for each
order. The only record displayed is the last one for each recordset. How
do I display the current record from the recordset and then move to the
next record and display the details on the same subform?
I want to use unbound forms, as they are significantly quicker, however
nobody seems to know how to use unbound subforms. I bought the Wrox book
Professional Access 2000 Programming, an excellent book, but this only
shows how to set single forms as unbound. I have put this question on
numerous other newsgroups and nobody has an answer. Can anyone hear help
me?
Message #2 by "John Ruff" <John_Ruff@m...> on Mon, 25 Jun 2001 05:13:33 -0700
|
|
You will not be able to see all the orders in the subform unless you unlink
the subform from the main form.
I would suggest adding a button on the main form that permits the viewing of
all records in the subform. On the button's OnClick event, you will set the
subform's Link Child Fields and Link Master Fields to "". You will then
need to re-populate the subform with the records.
But, instead of that, why not create a new form that will display the data
you want, and then open that form when all data needs to be viewed.
Hope this helps,
John Ruff - The Eternal Optimist :)
-----Original Message-----
From: Jason Bradford [mailto:j.bradford@a...]
Sent: Monday, June 25, 2001 12:10 PM
To: Access
Subject: [access] Unbound subforms
I am having difficulty populating an unbound subform using an ADO
recordset. I have created a complex database used to monitor the
processes an order has to go through. There is a main form that displays
the order date, customer name, address and delivery address. This is an
unbound form and is populated using an ADO recordset. The subform is
linked to the main form by the order reference number. The link works
fine as the subform data does relate to the main form order number.
However the problem is displaying all the records on the subform. I can
only get the subform to display a single record. The properties of the
form are set to continuous form and I expect to see a list for each
order. The only record displayed is the last one for each recordset. How
do I display the current record from the recordset and then move to the
next record and display the details on the same subform?
I want to use unbound forms, as they are significantly quicker, however
nobody seems to know how to use unbound subforms. I bought the Wrox book
Professional Access 2000 Programming, an excellent book, but this only
shows how to set single forms as unbound. I have put this question on
numerous other newsgroups and nobody has an answer. Can anyone hear help
me?
|
|
 |