Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 438
  • Last Modified:

ActiveX List/Grid Control

Do you know either a list or a grid ActiveX control that allow you to set the colour/font/size of each cell independantly ?
Now I know a lot of the ones for VB, but they are NOT suitable for Access, so please only controls that are known to be working in Access.
Points will be given to the first suplier of the selected control.
Cheers!
0
Carmy
Asked:
Carmy
  • 3
  • 2
1 Solution
 
HelicopterCommented:
The MS Flex grid allows you to do all the things you want (through code at run time). It is found as MSFlxGrd.ocx  in windows\system and works with Access 8 (I don't know about other versions)
0
 
CarmyAuthor Commented:
Helicopter!
Thanks this is a good start, but... (there has to be one!)
MSFlxGrd is actualy part of VB5/6 so it did require some hunting for the file.  However, What the control is to do is to replace a list control and display different colours for data as it meet certain criteria.
What this control is lacking as far as I can see is the ability to change the COLOR of the data in a cell and also to change the width of columns as required.
Possible?
0
 
HelicopterCommented:
To be honest I've never used it in anger, but don't the cellforecolor and the cellwidth properties do just that?

I'm at work at the moment, but I'll have a look later if you like. Have a look at the help topics for the control though, it's fairly extensive and I'm sure it will do what you want.
0
 
CarmyAuthor Commented:
Helicopter!  
The help on the access side is very limited, but when i looked from the vb side all was explained (sample too...), so ignore the last comments.  Last thing I need to know (and then the points are yours) is is there any way to bound this to the data, VB does it but I could not figure out how to do it in Access.
Thanks
0
 
HelicopterCommented:
Hmmm, I kind of thought that one might be coming.

There is a datasource property which, as you say, can refer to a data control in VB. It looks as though this isn't available from within access.

Article ID: Q16492 in the MSDN says:

When you add a data-aware (bound) control to a UserForm, the DataSource property is not available to link the bound control to a Data control.

(Although not specific to Access I think it applies)

WORKAROUND

You must use the DataSource property to bind a data source to a control. Because the DataSource property is not an available property, you cannot bind the control to a data source. To workaround this problem, use Visual Basic for Applications commands to populate the controls that are listed in this article. For additional information, please see the following articles in the Microsoft Knowledge Base:

  ARTICLE-ID: Q164922
   TITLE     : How to Fill the Microsoft Visual Basic 5.0 FlexGrid Control

This article is more for excel or word as it refers to userforms, but the principle is the same.


There is also this telling coda to the main article:

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now