create and save a form

tomro1

Registered User.
Local time
Tomorrow, 00:25
Joined
Jun 12, 2006
Messages
23
hi all,

I want to, if i click a button, that access makes me a new form where i can refer to later on, so I'll have to give it a name or save it. This is what i already have but if you know something else please tell me.

dim frm as form

Set frm = CreateForm()

DoCmd.Save acForm, "form1"
DoCmd.Restore

Now, the problem in this is that if you do createform, that he makes new forms named "form1, form2, form3,.." and then if you want to save it the name is variable, and that my problem because i need to fill the name to save it. and if its possible, to save it as a different name, like : docmd.save acform, 'form1" as Test.


please help
 
I think you are pretty close.

dim frm as form
Dim frmName as String
Set frm = CreateForm()
frmName = "MyForm"
frm.Name = frmName
DoCmd.Save acForm, frmName
DoCmd.Restore

I'm just guessing there but it should be fine?

Regards,
Pete
 

Users who are viewing this thread

Back
Top Bottom