Hi Wendy,
In most cases you can get done what you want without any VBA code.
In a backup copy of your application, click the Autoform icon in the
Database|Forms window and create a new form based on your 1 side table.
Clean it up a bit and then extend the bottom of the form enough to hold your
subform when it's ready. Open the datasource for the form and design your
query.
Back at the Database|Forms window, create a new form in a similar fashion.
Do not put a header or footer on this form unless you have them on your
existing subform. Open the datasource for the (sub)form and design its
query. When you are happy with it, close the subform with an appropriate
name.
Open your main form in design mode and reduce its size so that you can find
your new subform in the Database|Forms window. Drag your new subform onto
your new form to a point near the left side of the form and below all
existing controls. Release the mouse and Access will relate a subform
control on your main form and place your subform within it.
Before changing for Form view, look at the properties for the subform
control. You should see the appropriate field name(s) in Link Master Field
and Link Child Field. If those names are missing you have some
troubleshooting to do in your data sources.
HTH
--
-Larry-
--
"Wendy Powley" <we***@cs.queensu.ca> wrote in message
news:85**************************@posting.google.c om...
I have a subform which represents a 1:N relationship with the main
form. I would like to be able to read values from an external file,
fill the subform with the values read & allow the user to view/edit
the values via the subform.
I thought this would be accomplished using a simple loop; read values,
assign the various fields of the subform & repeat for each row of the
subform. Seems this is not possible, or at least I have been unable
to figure it out!
If you have any suggestions, I would greatly appreciate hearing them.
Thanks!
Wendy Powley
School of Computing
Queen's University
Kingston, ON