MSFlexGrid 6.0 control in an Acces Form Problem

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hi, I' am trying to use the MSFlexGrid ActiveX control in an Access form
in order to present my data. I already have a sub code for the grid data
population (the code is working fine in VB6.0). So I have put a MSFlexGrid
Control on an Access form. I want to populatate my grid with the onClick
event
of a commandbutton. The code I am using is the following

Private Sub Command13_Click()
Dim testData(1 To 30, 1 To 24) As Double
Dim testHeaders(1 To 24) As String
Dim j As Long, i As Long
'
For j = 1 To 24
testHeaders(j) = "Time " & CStr(j)
Next
For i = 1 To 30
For j = 1 To 24
testData(i, j) = 1.11111
Next
Next
'
Call Load_Data_On_Grid(Me.grid_Load, testHeaders(), testData(), Me)
'
End Sub
'
When I run the code I am getting the "Type Mismatch" error. In the Debuger I
can see that
me.grid_load = "". I suppose that means that the grid object is not
initialized..
I dont Know what's happening. Can anyone give a hint on this...

TIA Chris
 
You don't show us what the first parameter of your sub is defined as.

In a few cases, the property of the activeX control is slightly different in
VBA as compared to VB.

For example, I often see in VB

me.ActiveXContorl.ToolTipText = "bla bla bla"

The same property in ms-access (VBA) is:

:
me.ActiveXContorl.ControlToolTipText = "bla bla bla"

So, often, a few of the properties in activeX controls get a slightly
different name in ms-access (I know..this is horrible!).

On the other hand...are you sure you need the flex grid?

Take a quick look at the following screen shots, as they all use native
built in grid controls in ms-access, and also requite VERY little code to
work.

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

If you *can* use the native grid abilites of access...you should...
 
Back
Top