SubForm DoubleClick Event?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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."
 
Typo correction...
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."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top