If you want to create a new line control on an Access form, through VBA, at
runtime, you must open the form in design view (using OpenForm), from some
**other** form, then use the CreateControl method.
Alternatively, perhaps just "pre create" some unused Line controls manually,
& set their Visible properties False so they are not visible. Then code
within your form could reposition them & make them visible - no need for
CreateControl.
The New keyword will definitely not do what you want.
HTH,
TC
"Casper" <al***@xtra.co.nz> wrote in message
news:1a**************************@posting.google.c om...
I am issuing the following commands in a form's detail on click event.
Private Sub Detail_Click()
Dim Nline As Line
Set Nline = New Line
I get :"ActiveX component can't create object"
According to MS Help this means the <"Line"?> class is not registered
in the registry.
Is my problem that MS Access thinks this is an ActiveX class? If so
how do I fix?
Regards...