Go to Top

Inspect the control source of all controls in your project

Happy New Year!

Recently I was working on a project where I was implementing form spawning so that my client can see at least two different records using two identical forms, one of the actual forms and the other one a spawned version of itself, (a topic I’ve discussed at my SQL Server with Access meetings, click to join the announcement list!). Because the prior developer did not use form spawning, I had to search all instances in control source of all forms to identify references to the original form and replace it with TempVars.

ADVERTISING
ACCESS SAFETY AND TRAINING DATABASE

The project has dozens of forms and thousands of controls, so I created the following code to scan all form record sources for the offending row source and the control source of all controls on the form as well.

About Juan Soto

Juan Soto is a Senior Access Developer at IT Impact Inc. and a Microsoft Access MVP. He specializes in Access with SQL Server databases. His passion for Access has led him to helping a wide range of businesses in helping them establish a secure, stable and efficient environment with SQL Server. He's a frequent speaker at Access user groups nationwide and recently spoke at the Orange County SQL Saturday # 73. If you wish to have Juan speak at your next group meeting you can contact him here.

4 Responses to "Inspect the control source of all controls in your project"

  • Giorgio
    January 25, 2018 - 9:43 pm Reply

    Thanks Juan, in the article you say you were using TempVars to identify references to the original form while now you say you used TempVars to identify which record to display from all the records in memory. Is that the same thing? Can you give an example of how you used TempVars in this case?

    • Giorgio
      January 25, 2018 - 11:40 pm Reply

      Sorry, I got it now but can you still give an example of how you used TempVars in this case?

  • Giorgio
    January 24, 2018 - 8:27 pm Reply

    Why did you have to replace references to the original form with TempVars?

    • Juan Soto
      January 24, 2018 - 9:03 pm Reply

      The customer requested I implement form spawning, which meant that references to the form would not work, since there would be multiple copies of the form in memory and each displaying a different record. I used TempVars to identify which record to display from all the records in memory.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Contact Us
close slider
  • This field is for validation purposes and should be left unchanged.