Sub-Form Record Selection

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

I am using a form to set criteria to return records in a
sub-form. The sub-form is in a datasheet view.
What I would like to do is select a record in the sub-form
by double clicking on a field in the required record. This
opens a form in single form view, Make changes and then
close the single form.
This I can do by using a macro to open a form in single
form view by setting the property field "On Double Click".
The problem I have, is that when I double click I can only
bring up data from the first record in the list, not the
record I double clicked on. Also I cannot get the record
to re-fresh the changes in the sub-form without closing
the main form and then re-opening.

I hope that what I am trying to do is clear.

Any assistance is appreciated

Nick
 
On the record Source of the Single form in the criteria
put the following:

=[Forms]![MainForm]![Sub-Form]![FieldName]

On the OnOpen of the Single form do a me.requery.

When you open the Single form on the double click make
sure that the form is open as follows with the following:

DoCmd.OpenForm "Form Name", , , , , acDialog
 
Sorry posted before ready

DoCmd.OpenForm "Skill_Maint", , , , , acDialog
me.requery

this will refresh the sub form with the updates from the
opened single form.
 
Back
Top