One of the developers using iGrid ActiveX in MS Access helped us to find a bug in Access. This problem leads to improper functioning of the development environment. It looks like a problem in iGrid, but it is not so. The problem occurs if iGrid has an extra border set with the BorderStyle property in MS Access. In this case you can see an error message like 'The expression ResizeBeforeRedraw you entered as the event property setting produced the following error: ...' when you switch the view of the form with iGrid from Form View to Design View:

The expression you entered  - Access error message.png

Click to View Image66 View(s)

The short technical details are the followings. If you set an outer border for iGrid using the Access BorderStyle property by setting it to any value different from the default 'Transparent' value, the internal Resize event of iGrid is raised when the form goes to Design View. As a result, iGrid raises its public events related to drawing (ResizeBeforeRedraw, BeforeCellContentsDraw, AfterCellContentsDraw and the like). But the form can't process them because it is in a 'transient state' between Form View and Design View. This causes displaying of weird error messages like 'The expression <iGrid event name> you entered as the event property setting produced the following error: ...'

We tried to understand the nature of the problem and found that Access changes the position of the right border of iGrid 1 pixel left when switching to Design View. This happens only if BorderStyle is set, and this is definitely a bug in MS Access. We are trying to reach out the Access developers to report this bug and send them a demonstration database.

At the moment, there is only one way to avoid this problem in Access - not to use its BorderStyle property for iGrid (i.e. it must be set to 'Transparent').

We will update this thread as soon as we have any new info regarding the problem.