Set form to design view from VB

  • Thread starter Thread starter Sullivan
  • Start date Start date
S

Sullivan

Hey all

I've got a template, and right now, after a user designs
the layout of a couple of labels, then go to Form view and
they perform a keystroke to run a function.

During this function, the last thing I want it to do
(since I want this form to be a template) is save the
changes as a different form. However, DoCmd.Save doesn't
allow you to change the name of the form when it's in form
view - only when it's in design view. The function for
save as can't be outside the module, to my knowledge,
because it access a global variable in that module for the
Form.

So if anyone has a solution (the easiest, I think in
concept at least would be a way to switch to Design mode
in VB), please help!!!

Sullivan
 
DoCmd.OpenForm "MyNewForm", acDesign
You could then run some other code to perform the SaveAs - or, as a last
resort, use SendKeys.
 
Back
Top