alex_tr
2025-11-03T07:46:25Z
Hi,

I am preparing a 64-bit version of my Access project which uses iGrid.

In my 64-bit Office environment, I open my Access project and change the reference from "iGrid Control 7.5 (win32)" to "...(win64)". Then I get a compile error where I reference the iGrid .hWnd property:

"Function or interface marked as restricted...."

The iGrid object is declared as:

Public WithEvents igObj As iGrid750_32x64.iGrid

Any ideas what this might be?
Igor/10Tec
2025-11-03T13:56:00Z
First, there is no need to change the reference from "iGrid (win32)" to "iGrid (win64)". This should happen automatically.

Second, can you reproduce the problem in a brand new Access sample? If so, email us a detailed description how to reproduce the problem for the further consideration.
alex_tr
2025-11-03T17:08:20Z
Hi Igor,

Thanks for that. I will try to reproduce the error in a new Access project to send you.

Meanwhile, can you please clarify what I need to do to compile the 64-bit version of my project - do I register both dlls (32 & 64), and then my original reference will work?

Some more context: my main development environment is 32-bit Office, and I have set up a VM with 64-bit Office to create my 64-bit compiled version. We are setting up a deployment package that will include both .accde's (32 & 64), and which will install the appropriate version depending on the user's Office bitness. (So aside from the compile error, let me know if I am doing anything wrong here)

Also, I should note one more thing: before changing the reference, I tried compiling the Access project as-is under 64-bit Office - it compiled without error, and iGrid appeared to work fine in the application with the little testing I did. I just assumed though that it was still running iGrid 32, and that something would eventually go wrong.

Thanks so much for all the help.


Igor/10Tec
2025-11-04T06:35:31Z
I tried to reproduce the problem — no luck.

I created a simple accdb file with one form in 64-bit Access, placed an iGrid and a command button on the form, then added this code:

Private Sub Command1_Click()
   MsgBox iGrid0.Hwnd
End Sub

It works ok in accdb. Then I used this source accdb to compile it to accde in 64-bit Access and in 32-bit Access. Both compiled accde work ok. Pay attention to the fact that I didn't change the reference to iGrid when compiling from the same source file in the Access of the other bitness.

I also tried to reproduce the problem with another form code:

Public WithEvents igObj As iGrid750_32x64.iGrid

Private Sub Form_Load()
   Set igObj = iGrid0.Object
End Sub

Private Sub Command1_Click()
   MsgBox igObj.Hwnd
End Sub

And again, the compiled accde files work ok.
alex_tr
2025-11-06T09:33:21Z
Hi Igor,

A thought occurred, that I should try to de-compile my Access project first, before compiling it again under 64-bit Office - I did that and the problem disappeared.

That normally should have been the first thing to try - sorry for taking up your time!

All good now, and everything is working fine.

For deployment to my customers: as well as the appropriate version of my compiled Access project, I only need to install one iGrid OCX - the 32 or the 64, depending on the Office bitness - and not both of them. Is that correct?

Thanks
Alex
Igor/10Tec
2025-11-06T15:11:21Z
Yes, it's enough to install only one OCX corresponding to the Office bitness.