Unanswered: Replicating a split form in in a subform
I have been working on a subform, which I would like to have behave exactly the same as a split form.
At this stage I believe that split forms are not permitted in subforms so I have been trying to replicate the split form by adding two sub forms to the main form the first a single form for the data entry pannel and the second a data sheet form for the data sheet pannel.
This works fine except when I select a record from the data sheet subform I want the data entry form to display this record.
I have tried to change the recordset for the data entry form on double click of the data sheet form but get an error message saying that it is not possible for this object??
I looked a little closer and it appears that the Recordset property doesn't exist for the data entry form?
Can you suggest any other way that I can load the selected record from the data sheet form into the data entry form?
What I'm trying to do is, on double clicking the record of interrest from the data sheet sub form the same record is loaded into the data entry subform, ready for editing.
Can you provide more explainantion on what you have suggested please?
The code I posted displays the record of the current record selected in the datasheet subform, which behaves like a split form just like what you have mentioned. Now, if the "record of interest from the datasheet subform" needs to be double-clicked, forget the previous code and try this one.
Assuming the you have a bunch of textboxes in your data entry from, you need to reference these textboxes correctly.
Private Sub Form_DblClick(Cancel As Integer)
Forms![formname]![subDataEntry].[Form].txtLoadHere = Forms![formname]![subDatasheetSubform].[Form]![FIELD_NAME]
You may need this one on how to reference subforms and controls.