
Copy buttons on a form in real time
Look into using a control array. then use the load, and unload methods to
create and destroy the buttons.
Hi,
can you help me.
I'm trying to build a form in real-time from a set of reports in Access. I
can access the access.application object and return a list of reports in the
database, then I need to add a button for each report into Vb.
I've tried the following code :
Private Sub Command1_Click()
Set Command3 = New Command2
With Command3
.Top = Command2.Top + 1000
.Visible = True
End With
End Sub
but I get the following message :
compile error:
user-defined type not defined.
I've also tried creating my own ocx, but to no avail, I still get the same
message.
Can I do this ?
It seems to work with forms, eg dim f as new form1,
f.show, so why not with command buttons ?
Tim Heap
Senior Analyst Programmer
POSTAR Ltd
www.postar.co.uk
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!