HELP! Please!!! Click data and open a form to edit that same data.

  • Thread starter Thread starter NDClark
  • Start date Start date
N

NDClark

I have a macro set to open another form (The Edit Form) to edit data found on
the original Multiple Item Form.

The problem is the (The Edit Form) always opens to the very
first record or a new record.

I need the form to open the record I click on, so I can edit that record.

Can someone give me some suggestions as to what I am doing wrong?
 
It depends what type of form your are clicking the date on

eg. In a datasheet you put the command on the OnClick of the Form. On other
forms you put the command of the OnCllick of a control (normally), etc

eg. (datasheet)

Private Sub Form_Click()
DoCmd.OpenForm "FormToOpen", acNormal, "",
"[ID]=[Forms]![DataSheetName]![ID]", , acNormal
End Sub
 
Sorry - I have just re-read you post (you are using a macro). I don't use
many macros - so...

Try this
Open your Macro in Design View
Select Open Form
Use the build option (in the box at the bottom)
Add the ID field on the form 1
Add the name (form name and control name) of form 2

So it will look something like this

[ID]=[Forms]![Form2Name]![ID]
 
Thank you Wayne! You have helped me. I was pulling my hair out with this.

Wayne-I-M said:
It depends what type of form your are clicking the date on

eg. In a datasheet you put the command on the OnClick of the Form. On other
forms you put the command of the OnCllick of a control (normally), etc

eg. (datasheet)

Private Sub Form_Click()
DoCmd.OpenForm "FormToOpen", acNormal, "",
"[ID]=[Forms]![DataSheetName]![ID]", , acNormal
End Sub




--
Wayne
Manchester, England.



NDClark said:
I have a macro set to open another form (The Edit Form) to edit data found on
the original Multiple Item Form.

The problem is the (The Edit Form) always opens to the very
first record or a new record.

I need the form to open the record I click on, so I can edit that record.

Can someone give me some suggestions as to what I am doing wrong?
 

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