Simulate record selection

I need to simulate selecting a record on a form on some event (prob after update) to update another forms OnCurrent event . Does this make sense ? it's not very easy to explain.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

No, it doesn't :)

Just the title, "simulate record selection" makes one think of the "Edit / Select Record" menu command, which you can "simulate" (execute through code) with "RunCommand acCmdSelectRecord"

The "explanation" however seems to relate to form navigation. Do you want to move to a certain record in a second form when editing is done in the first?

Please expand, I'm sure we will be able to help.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
livvieAuthor Commented:
harfang you might actually have helped already I think the RunCommand acCmdSelectRecord might be what I am looking for.
I have one form that shows a list of records and a second form that shows the details of these records depending on which one is selected on the first form. I had a problem with the child master relationship that was giving an "you cannot assign a value to this object error " so now the second forms datasource is updated when a selection is made on the first form.
What I am doing now is copying a record and then I want it to be displayed and editable. Copying is fine but unless I go an click on the new record it is the details of the old record that is displayed (as this is the record selected in the first form) so I want to automatically select the new record after it is created.
livvieAuthor Commented:
harfang DoCmd.RunCommand acCmdSelectRecord  works but I now need a way to ensure it runs after every copy.
I put it in the OnDirt event and that works for the first time you copy a rec but if you do a second one it never enters the OnDirty event  Any ideas ?
Im not sure about OnDirty. Normally, a record is "dirty" after it has been changed and until it has been either saved or canceled. I do not think that paste-append ever triggers the OnDirty event.
Try AfterInsert, perhaps.

Another idea, can't you select the record just *before* copying it rather that *after* all editing events?

Good Luck.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.