We help IT Professionals succeed at work.
Get Started

MS Access 2016 .Net Framework Reference

Last Modified: 2016-05-30
Problems with MS Access Reference(s) after changing from a server with 2008 R2 to 2012 R2 (and a new install of Access 2016)
The following code is what has initially highlighted the issue.

Public Function fSHA256Base64(s As String, k As String) As String
      Dim lngLoop                   As Long
      Dim oUTF, oEnc
      Dim hmac()                    As Byte
      Dim strText                   As String
      Dim strTemp                   As String

12890 strText = s
12900 Set oUTF = CreateObject("System.Text.UTF8Encoding")
12910 Set oEnc = CreateObject("System.Security.Cryptography.HMACSHA256")

12920 oEnc.Key = oUTF.GetBytes_4(k)
12930 hmac = oEnc.ComputeHash_2(oUTF.GetBytes_4(s))
12940 strTemp = Base64Encode(hmac())
12950 fSHA256Base64 = strTemp
End Function

Open in new window

Line 12900 throws run time error -2146232576 (80131700) ‘Automation Error’.

SVR with 2008R2 had referenced System.tlb from the v2.0.50727 .Net Framework folder.
SVR with 2012R2 has referenced from the v4.0.30319 folder.

However, when I change new server from v4 to the v2 file, even though it appears to have changed it (judging by the 'Location' reference), the next time I open the Reference panel it has changed back to v4! This happens even on a new file where the .net wasn’t even referenced to begin with. Ie I add system.tlb from the v2 folder. When I next open references the ref location is the v4 folder!

1)      Have I correctly identified the .net version as the cause of the actual error?
2)      How can I force the reference to the older version / stop it changing itself?

Many thanks
Watch Question
President / Owner
Most Valuable Expert 2017
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE