Kod treba da u formi kreira TextBox. Za početak sam to zamislio da bude u eventu buttonclick - a, mada ne mora. Šta je bitno: pokušao sam sa kodom koji je u Accessu dat u helpu, ali nešto tu nije uredu. Kod je iz helpa sledeći( s tim što sam ja komentarisao nepotrebne linije koje kreiraju formu, a takođe; moja forma se zove Form1):
Private Sub Command2_Click()
NewControls
End Sub
Sub NewControls()
'Dim frm As Form
Dim ctlLabel As Control, ctlText As Control
Dim intDataX As Integer, intDataY As Integer
Dim intLabelX As Integer, intLabelY As Integer
' Create new form with Orders table as its record source.
'Set frm = CreateForm
'frm.RecordSource = "Orders"
' Set positioning values for new controls.
intLabelX = 100
intLabelY = 100
intDataX = 1000
intDataY = 100
' Create unbound default-size text box in detail section.
Set ctlText = CreateControl(frm.Form1, acTextBox, , "", "", _
intDataX, intDataY)
' Create child label control for text box.
Set ctlLabel = CreateControl(frm.Form1, acLabel, , _
ctlText.Name, "NewLabel", intLabelX, intLabelY)
' Restore form.
DoCmd.Restore
End Sub
Greška se javlja u liniji : Set ctlText idt.... i dojavljuje Runtime error 424 (object required)
Unapred hvala na odgovorima










Kreiranje kontrole u runtime-u ( Access)
Re: Kreiranje kontrole u runtime-u ( Access)
Re: Kreiranje kontrole u runtime-u ( Access)