From: Chad on
I have a continuous form that is populated by a query I created. I would like
to add a button in the details sections of the continuous form that would
prompt a popup for the user to edit information specific to the record that
was selected.

Is there a way to reference the record in which the button pressed?

Thank you in advance,

Chad
From: John W. Vinson on
On Mon, 12 Apr 2010 13:04:01 -0700, Chad <Chad(a)discussions.microsoft.com>
wrote:

>I have a continuous form that is populated by a query I created. I would like
>to add a button in the details sections of the continuous form that would
>prompt a popup for the user to edit information specific to the record that
>was selected.
>
>Is there a way to reference the record in which the button pressed?
>
>Thank you in advance,
>
>Chad

Sure. If the button is in fact on the detail section (shown repeatedly) you
can just refer to a field (e.g. the primary key value of the record that's
selected) in the code:

Private Sub cmdPopUpForm_Click()
DoCmd.OpenForm "MyPopupForm", WhereCondition := Me!PrimaryKeyField
End Sub

using your own fieldname of course.
--

John W. Vinson [MVP]