[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Simulate record selection

Posted on 2004-10-28
Medium Priority
Last Modified: 2006-11-17
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.
Question by:livvie
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 58

Accepted Solution

harfang earned 1000 total points
ID: 12432403
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.


Author Comment

ID: 12432465
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.

Author Comment

ID: 12436292
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 ?
LVL 58

Expert Comment

ID: 12440709
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.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question