Displaying data from one Subform to another for editing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a continuous subform that is linked to a table with a unique ID. There
is a button for every record in this subform so the user can edit any record
by clicking the button next to it.
I want the info from the selected record to be displayed in a 2nd suform
that is linked to the same table for editting and only becomes visible on the
click event.
I can't seem to get the selected record to appear in the 2nd subform and be
linked to the same unique ID.
Access seems to want to add a new record and won't let me insert the unique
ID from the 1st subform in the second for editing.

Where to from here?
 
The Docmd.Open form needs to specify a Where condition (to get the
appropriate record), and the form you are opening should have the DataEntry
property to No
 
Hi John

This function has worked in part. It is calling the subform up but not as a
subform within the main form. It is also not allocating the record selected
in first subform to be edited in the 2nd.

Dim StUnid As Variant
Dim StForm As String

StUnid = "[UNFID] = [Forms]![main/parentForm]![Subform1]![UNFID]"

StForm = "Subform2"

DoCmd.OpenForm StForm, , , StUnid
 
Back
Top