Hi Experts,
I have hundreds of Forms/Reports that needs each of their RecordSource property to be set (They were lost somehow when some import was done long time ago). But luckily I have the list of RecordSource values for all of these in a text file pulled from a documentation that was did...
This is an old post but if someone was looking here is a quick, elegant solution.
Declare a public variable at the beginning of your code module.
Public frm As Form
Now you can do this in your procedure:
Set frm = New Form_Table1
frm.RecordSource = "SELECT TOP 1 * FROM Table2" ' Set...