Use code to save a newly created form

H

Harry H

Hi all, I am using createform to create a new form. I would like to be able
to close this new form using code and save this form to newname and not from
the design mode. Can this be done? Example please.

Thanks in advance!
 
D

Dirk Goldgar

Harry H said:
Hi all, I am using createform to create a new form. I would like to
be able to close this new form using code and save this form to
newname and not from the design mode. Can this be done? Example
please.

Thanks in advance!

Dim f As Form

Set f = Application.CreateForm()

' ...

DoCmd.Save , "AAAAAAA"
Docmd.Close acForm, f.Name

Set f = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top