Renaming a programatically created form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I created a form from VB code and when it is finished I want to rename it
(to change the default name Access gave it).
I only could do it by selecting the new object in the database window
DoCmd.SelectObject acForm, <Access generated name>, True
DoCmd.Rename <new name>
But this has several disadvantages:
Flashes the screen, bring the database window to visible (even it was
hided), etc.

Thank you for your help!

Gabor
 
SelectObject is not needed. Just:
DoCmd.Rename "MyNewName", acForm, "Form1"

If that still bothers you, you could experiment with Echo off.
 
Back
Top