I like the subform/subreport control in Access, and I want to put an instantce of the control on my VB6 form.
I reference the msacc.olb in my VB6 project, and put the following codes in my form module.
Private Sub Form_Load()
Dim aa As Access.SubForm
Set aa = Me.Controls.Add("Access.SubForm", "sf1")
aa.Name = "vvvddvv"
aa.Visible = True
Debug.Print aa.Name, aa.Left
End Sub
I get a Run-time Error '711': Invalid Class String. Looking For Object with ProgId:Access.SubForm.
How can I fix it? Or is there other approach which I can use the Access' SubForm control in a Vb6 form?