link to a record on a form - subforms

B

bigbump

I have created a link from one form to a specific record on another using the
following macro;
Action: Open Form
Where Condition: [ID]=[Forms]![Newspaper Query]![ID]
This works perfect until I try to add the first for as a sub form to my home
page form. When I click the link it first asks me to 'Enter Parameter Value -
Forms!Newspaper Query!ID' If I type in the ID it will take me to the
specified record but this is rather messy.
Am I missing some code with this being changed into a subform?
 
A

Al Campagna

Bigbump,
Not sure if I understand...
I think you're saying that when your "calling" form was a standalone, the
Where argument worked, but now... when that same form is a subform, the code
fails.
And... if your ID is now on the subform, you should address it as....
(use your own object names)
=Forms!frmMainName!frmSubformName.Form!ID
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

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

bigbump

That is brilliant, it is working now, thanks for your help.

Al Campagna said:
Bigbump,
Not sure if I understand...
I think you're saying that when your "calling" form was a standalone, the
Where argument worked, but now... when that same form is a subform, the code
fails.
And... if your ID is now on the subform, you should address it as....
(use your own object names)
=Forms!frmMainName!frmSubformName.Form!ID
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

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

bigbump said:
I have created a link from one form to a specific record on another using
the
following macro;
Action: Open Form
Where Condition: [ID]=[Forms]![Newspaper Query]![ID]
This works perfect until I try to add the first for as a sub form to my
home
page form. When I click the link it first asks me to 'Enter Parameter
Value -
Forms!Newspaper Query!ID' If I type in the ID it will take me to the
specified record but this is rather messy.
Am I missing some code with this being changed into a subform?
 

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