SubForm DoubleClick Event?

R

Raja

Hi,
I made a subform from a query, and made a form to same query for edit
record. I add an event in double click in the subform,

DoCmd.Openform "editform"

But when i double click on it, it is showing me all data in the form which
is in the query.
So!how can i make it? that when i double click on the subform it just open
selected data in the form so i can change the specifice data.
Please help me.
 
A

Al Campagna

Raja,
Your subform records should each have a unique key field value. (say... CustID for
example)
In your subform, use the double-click event of the CustID field to initiate the code to
open the Edit form.

The code that opens the Edit form should be...
DoCmd.OpenForm ""frmYourEditFormName", , , "CustID = " & CustID
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Top