J
JH
Folks,
I have an application which needs to create a form in an .mdb other than the
one it is running in. No problem doing that with:
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (Destination)
Set dbOut = appAccess.CurrentDb
Set frm = appAccess.CreateForm
However, the form that is created has no form header and footer, which I
need. Again I can get round that by using a template that gets exported to
the target database first.
DoCmd.TransferDatabase acExport, "Microsoft Access", Destination, acForm,
"frm_template", "frm_template"
then:
Set frm = appAccess.CreateForm(, "frm_Template")
However I want to create this utility as an .mde file, and that means I
can't export the template from the .mde file to the target .mdb file.
So, the question is: How do I create a form within VBA that has header and
footer sections? I have searched in vain for a "addsection" method, so any
help would be greatly appreciated.
John
I have an application which needs to create a form in an .mdb other than the
one it is running in. No problem doing that with:
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase (Destination)
Set dbOut = appAccess.CurrentDb
Set frm = appAccess.CreateForm
However, the form that is created has no form header and footer, which I
need. Again I can get round that by using a template that gets exported to
the target database first.
DoCmd.TransferDatabase acExport, "Microsoft Access", Destination, acForm,
"frm_template", "frm_template"
then:
Set frm = appAccess.CreateForm(, "frm_Template")
However I want to create this utility as an .mde file, and that means I
can't export the template from the .mde file to the target .mdb file.
So, the question is: How do I create a form within VBA that has header and
footer sections? I have searched in vain for a "addsection" method, so any
help would be greatly appreciated.
John