MS Access ActiveX at runtime

Example requests & Code samples for GdPicture Toolkits.
Post Reply
anderjan
Posts: 3
Joined: Thu Dec 18, 2008 1:11 pm

MS Access ActiveX at runtime

Post by anderjan » Thu Dec 18, 2008 1:23 pm

Hi
I need to insert the GdViewer ActiveX control in an MS Access 2007 form at runtime.
Does anyone have a code example how to do that?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: MS Access ActiveX at runtime

Post by Loïc » Thu Dec 18, 2008 5:09 pm


anderjan
Posts: 3
Joined: Thu Dec 18, 2008 1:11 pm

Re: MS Access ActiveX at runtime

Post by anderjan » Fri Dec 19, 2008 6:02 pm

That does not work
Here is one way how do it

Dim ctl As Object
DoCmd.OpenForm "FormName", acDesign ' Form you want to add control to
Set ctl = CreateControl("FormName", acCustomControl)
ctl.OleData = Forms!Template!oGdViewer.OleData ' Template=Form where you have a control you want to "copy properties" from

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests