Go To Current/Selected Record Problem

  • Thread starter thinkwelldesign
  • Start date
T

thinkwelldesign

Hi,

I have a form with a subform that I am using. I have a dropdown bo
that lists business projects, and then the subform lists the record
associated with the project selected. Pretty usual so far, I suppose.

Then, when I doubleclick a subform record, I have a macro written whic
opens a form. I want this form to open to the record that I ha
doubleclicked on in the subform. Is there any way to open "any form" t
a specific record that I had selected in some other form or query?

TIA,

Dav
 
R

Rick Brandt

thinkwelldesign said:
Hi,

I have a form with a subform that I am using. I have a dropdown box
that lists business projects, and then the subform lists the records
associated with the project selected. Pretty usual so far, I suppose.

Then, when I doubleclick a subform record, I have a macro written which
opens a form. I want this form to open to the record that I had
doubleclicked on in the subform. Is there any way to open "any form" to
a specific record that I had selected in some other form or query?

Drop a new command button on your subform with the wizard enabled. One of the
choices for the command button wizard does exactly this. Afterwards you can
copy the code created for the button's Click event to the desired double-click
event and then delete the button.
 
A

Albert D. Kallal

The code behind the buttionshould be:


me.refresh
docmd.OpenForm "theform",,,"id = " & me.id
 

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

Top