msmerry
asked on
From one form, opening another form and finding matching data
I have a form and subform. The subform has a button to open another form and find the record with matching id. The macro behind it is "1AWorksAddressfrm, Form, , [worksID]=[Forms]![1aconta ctsubfrm].
If I click this button on the subform I get a dialog box - Enter new parameter - [worksID]=[Forms]![1aconta ctsubfrm]. I then have to type the worksid in, at which point it opens correctly.
However, If I open the subform independently, the button works perfectly and goes straight to the matching record - no dialog box, no typing.
Why? What do I need to do to make it work in the subform mode, as that is where it is needed?
If I click this button on the subform I get a dialog box - Enter new parameter - [worksID]=[Forms]![1aconta
However, If I open the subform independently, the button works perfectly and goes straight to the matching record - no dialog box, no typing.
Why? What do I need to do to make it work in the subform mode, as that is where it is needed?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mbizup, thanks too - I will try that tomorrow
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to all of you - my knowledge grows every time I come here for help
ASKER
I know that it's supposed to be much better to use VBA, but it's a foreign language to me, so I stick with what I know, and one day I'll learn VBA
I will try your suggestion tomorrow