A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Updating specific record on continuous form



 
 
Thread Tools Display Modes
  #1  
Old April 12th, 2010, 09:04 PM posted to microsoft.public.access.forms
chad
external usenet poster
 
Posts: 631
Default Updating specific record on continuous form

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
  #2  
Old April 13th, 2010, 01:10 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Updating specific record on continuous form

On Mon, 12 Apr 2010 13:04:01 -0700, Chad
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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:47 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.