Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
RaymondC  
#1 Posted : Thursday, June 27, 2013 9:27:09 PM(UTC)
RaymondC

Rank: Advanced Member

Groups: Registered
Joined: 6/24/2013(UTC)
Posts: 95
Location: Seattle, WA

Thanks: 2 times
Was thanked: 2 time(s) in 1 post(s)
I am trying to change the color of the horizontal and vertical gridlines between rows of data.

If GridlineColor is the correct property then it is not working. It has no effect when changed in Access 2010.

Thanks.

Ray

EDIT: The property works if set in the Property Sheet dialog window but not if set via VBA. Not a big deal but F.Y.I.

Edited by moderator Monday, September 7, 2015 10:28:44 AM(UTC)  | Reason: Corrected post subject

sam  
#2 Posted : Saturday, September 28, 2013 5:37:48 AM(UTC)
sam

Rank: Newbie

Groups: Registered
Joined: 9/28/2013(UTC)
Posts: 1

Grd.GridlineColor = vbRed
Grd.GridLines = igGridLinesBoth

seem to redraw the grid lines.

Thanks.

Sam.

Igor/10Tec  
#3 Posted : Monday, September 7, 2015 10:26:35 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,114

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
The explanation why it does not work in MS Access is very simple. When we write

Code:
Grd.GridlineColor = vbRed


, actually we access a so-called "extender property" provided by MS Access but not the iGrid one (for an explanation of the concept of extender properties, you can read this MSDN article for VB6).

As we can see from the Object browser, MS Access implements the GridlineColor property for the Control class:

MS Access Control GridlineColor Property.png

All controls on MS Access forms can be also referenced through the Control class, and thus they also have its common properties.

To make the iGrid property work, we simply need to access it through the helper Object sub-property that provides us with direct access to the properties and methods of an ActiveX control:

Code:
Grd.Object.GridlineColor = vbRed
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.