moot2010
asked on
How to SetFocus based on a value in a TempVar
Hello. I have a form that displays search results. When the user clicks on a certain record, a macro saves the "ID" value (number) to a TempVar (AccredID_Set).
I then have a macro that opens a new form showing all accreds of the unit the person selected. I would like to SetFocus on the exact record the person selected in the search result form. (So the person doesnt have to go searching through the records again.)
I need to figure out how to set focus based on matching the Accred ID of the new form with the AccredID of the old form. (Saved as a TempVar). I am not finding the syntax or where I should stick the code... (On Load?)
Thanks for the help!
I then have a macro that opens a new form showing all accreds of the unit the person selected. I would like to SetFocus on the exact record the person selected in the search result form. (So the person doesnt have to go searching through the records again.)
I need to figure out how to set focus based on matching the Accred ID of the new form with the AccredID of the old form. (Saved as a TempVar). I am not finding the syntax or where I should stick the code... (On Load?)
Thanks for the help!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
The example code provided worked perfectly.
ASKER