Article ID: 174497
Article Last Modified on 1/20/2007
Option Explicit
Sub CreateControlOnPage()
Dim frm As Form, ctl As Control
' Create a new blank form.
Set frm = CreateForm()
' Create a tab control on the new form.
Set ctl = CreateControl(frm.Name, acTabCtl, acDetail)
' Create a text box on the form, and specify that Page2 is
' the parent of the text box.
Set ctl = CreateControl(frm.Name, acTextBox, acDetail, "Page2")
ctl.Top = 0.5 * 1440
DoCmd.SelectObject acForm, frm.Name
DoCmd.Restore
End Sub
CreateControlOnPage
Additional query words: inf TabControl
Keywords: kbhowto kbprogramming KB174497