Go to specific record in a subform

W

Wayne Robinson

I have a subform that lists many records (obviously). I want to be able to
go to a main form with the record that the user is current focused on (the
record selector is pointing to). I don't know the control name to do this,
is there a way with a macro?


Kindest regards,

Wayne

This email and any attachment have been scanned by Norton and are believed
to be virus free.
 
S

Steve Schapel

Wayne

Presumably you will have a Primary Key field included on the subform.
Let's suppose it is called [ID]. Use an OpenForm action in your macro,
and in the Where Condition argument, put the equivalent of....
[ID]=[Forms]![NameOfForm]![NameOfSubform]![ID]
 
W

Wayne Robinson

Steve, You are the Best!

I have tried everything having to do with a record and never thought of the
ID field. Thanks so much.

Wayne

P.S. I'm a tax guy (who likes fiddling) building a research database. It has
turned out pretty well, but still needs some tweaking. I have gone back in
my forms and built defaults based on whether the item is taxable or exempt
etc. (I'm also a user so the less mouse clicks the better!).

Thanks again, I hope one day I can give someone advice.
 
S

Steve Schapel

Best wishes, Wayne. Doesn't matter where you've got to, there's always
more to learn, but it sounds like you are enjoying the process, which is
wonderful.
 

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