Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are ActiveX methods different between VB and MS-Access

We have recently purchased "Measurement Studio" as part of Labview 7. I will be using it via VB, but I am attempting to convert an Access db to do so. When I use the ActiveX objects in MS-Access, I get different (much more limited) methods and properties (for example the CWGraph object does not have a PlotY() method. Does anyone know what I am doing wrong?
0 Kudos
Message 1 of 3
(3,289 Views)
You're not doing anything wrong - this is a peculiarity of Access. ActiveX controls must be hosted in a control container. When you add an ActiveX control to an Access form, Access creates a wrapper container control to host the ActiveX control and adds this wrapper control to the form. You can verify this by looking at the type of the control in the properties window. You'll notice that it's CustomControl and not CWGraph as expected.

The way that you get to the actual control is via the Object property of the CustomControl. For example:

Dim graph as CWGraph
Set graph = CWGraph0.Object
' Now access the graph functionality via graph instead of CWGraph0.

- Elton
Message 2 of 3
(3,289 Views)
Elton,
This should be recorded as the perfect Usenet answer. Short, precise and correct. Thanks greatly. I would have responded earlier but for the flu.

Thanks again
Iago
0 Kudos
Message 3 of 3
(3,289 Views)