I am updating an Access 97 DB w/ VBA code to Access 2007. The VBA code uses DAO objects that Access 2007 references when I converted the db files (first from 97 to 2002, then to 2007). My problem specifically is with the two references: "Microsoft DAO 3.6 Object Library" and "Microsoft Office 12.0 Access database engine Object Library." The stuff I've read on the web says that the ADE 12.0 is supposed to supercede the DAO 3.6 reference, and that by just checking the ADE 12.0 box everything should work. Since they both provide references for objects of the same name, these two references cannot be checked at the same time. However, when check the DAO 3.6 box, and leave the ADE 12.0 box unchecked, Access can't find a "frmLogin" form that exists. If I uncheck the DAO 3.6 box and check the ADE 12.0 box, I get a run-time error 13: "type mismatch" for a Visual Basic "Err" object: - Public Function basGetString(ByVal lngStringID As Long, ParamArray varStringArgs() _
-
As Variant) As String
-
Dim intTokenCount As Integer
-
Dim strResString As String
-
-
On Error GoTo err_basGetString
-
-
strResString = basLoadString(lngStringID)
-
-
If Not IsMissing(varStringArgs) Then
-
intTokenCount = 0
-
-
Do While intTokenCount <= UBound(varStringArgs)
-
strResString = basReplaceToken(strResString, _
-
m_cstrArgToken, varStringArgs (LBound(varStringArgs) + intTokenCount),_
-
1, 1)
-
-
intTokenCount = intTokenCount + 1
-
Loop
-
End If
-
-
strResString = basReplaceToken(strResString, m_cstrVBCRLFToken, vbCrLf, -1, 1)
-
basGetString = strResString
-
-
exit_basGetString:
-
Exit Function
-
err_basGetString:
-
Err.Raise Err.Number, "basGetString", Err.Description
-
-
End Function
The debugger points the the second-to-last line: - Err.Raise Err.Number, "basGetString", Err.Description
I have been successful disambiguating recordset objects, which resolved many of the other referencing conflicts in the code: Dim rs As DAO.Recordset or Dim rs As ADODB.Recordset , but this hasn't worked with the Err object. -That is, I've tried to rewrite the Err object as a DAO Error object. I also have not been able to find another reference in the VB editor that resolves this referencing error, but doesn't also conflict with the other ADE 12.0 reference. So, I don't understand why checking the ADE 12.0 box doesn't solve all my problems. And I'm having trouble figuring out how to rewrite the code so that it references the ADE 12.0 library instead. Lastly, the ADE 12.0 reference is really pointing to the ACEDAO.DLL in the following folder: C:\Program Files\Common Files\Microsoft Shared\OFFICE12 . Any suggestions would be really appreciated.
3 3366
How about changing err.raise to MsgBox? - MsgBox Err.Number & " " & Err.Description
Try and see if it gets error like this.
@colintis
Thanks for the suggestion, Colintis. I tried your suggestion, but the type 13 message is still there. The only difference now is that it appears in a MsgBox, and not as a debugger error message. Back to the drawing board...
If so there is a variable defined in VBA is a different type to a field in the table. Do you extract field names in a sorted order that is the same to the ordering in the data table?
Or something similar, make a check. As what I had experienced, when converted from version 97 database, the ordering in the data fields may changed, this error is more obvious if you are getting data with the column index. Just make sure data types you are pointing to are fine. Access 2007 does a lot of funny things with a direct conversion on version 97 or older databases.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Paul H |
last post by:
Why the heck was this dropped? All my dbs use ULS even the complex ones. It
aint perfect, it's too fiddly, but it works.
How will I be able to say "These users can run these reports and these users
can't." in Access 2007? Will I have to create my own tables
(tblSecurityGroups, tblSecurityUsers) and code the whole thing?
Thanks,
Paul
|
by: bobdydd |
last post by:
Hi Everybody
I am currently updating a 2000.mdb to a 2007.accdb and I am trying to
use the 3.6 DAO Object Library in the tools>references in the vb
editor. This produces an error "Name conflict with an Existing
Library" and yet I need this to run the following code.
I have a combo property set to "Limit to List" and on the "not in list
property" the following code needs to run
|
by: prn |
last post by:
Hi folks,
I'm relatively new to Access, but I seem to have drawn the short straw, so I have the assignment for my workplace of looking for problems/inconsistencies in migrating applications to Access 2007 from previous versions. We don't have a lot of Access applications, but even a dozen or so can be an interesting challenge. I have loaded a few that were created in Access 2003 into Access 2007 and all of the ones I have tried have come up...
|
by: Neil |
last post by:
A client of mine likes some of the new bells and whistles in Access 2007,
and is thinking about converting our A03 format MDB to an A07 format file.
However, while some of the users have A07, many do not, and it's not clear
when they would get it. His thought was to use the upcoming Access 2007
runtime to allow the users who are still running Office 2003 to be able to
run the database.
While I use multiple versions of Access on my...
|
by: nico5038 |
last post by:
Access 2007 Linkedtable manager refuses to relink tables having a field with the "Attachment" datatype.
Problem:
When placing a split database in another folder, the Linked table manager should be used to relink the tables. The Linkedtable manager does however refuse to relink tables having an "Attachment" datatype field.
Symptoms:
Open the Linkedtable manager and select a linked table with an "Attachment" datatype field. Now try to...
| |
by: cwoll |
last post by:
Hi
I need help. I have a ms access 2003 database that I would like to
upgrade to ms access 2007. The first time I opened I had to fix a few
references it wanted a DAO2535.TLB file witch I gave it, and a
utility.mda file witch I think i gave it. The instructions on
Microsoft's web sight were not very clear where to put the utility.mda
so I am not sure if I have it at the right place. The Database does
not ask for it anymore.
I have...
|
by: raylopez99 |
last post by:
10 years ago, the below was written (see very end, after my signature
RL).
What, if anything, has changed?
I have Access 2003 and soon Access 2007 on a Windows XP Professional
or Windows Vista Ultimate machine, with SQL Server Express running on
it, and I want somebody, with a password (which I will provide) to be
able to log onto a A03 or A07 dB from the internet. Now that I type
this I realize that unless I put the database onto a...
|
by: dan.allen.dc |
last post by:
I am looking for a quick sanity check, to make sure I my view of a
problem is reasonable.
Our organization just upgraded from Access 2003 to Access 2007. One
of our MS Access databases is not working the way it used to. It is
my understanding that this is a typical upgrade problem with Access
2007.
The database in question has a number of complex forms that talk to
one another. There is a lot of VBA code in the background making it
|
by: Bob Alston |
last post by:
Trying to install some software on Access 2007. The software works just
fine on earlier versions of Access.
I have been told that it works on Access 2007 but I have not seen that
personally.
The command buttons on my user-created forms do not function when it is
run under Access 2007.
The operating system is Windows XP home SP2.
|
by: prakashwadhwani |
last post by:
Hi !! I'm about to develop a new project for a client.
Should I go about it in Access 2003 or 2007 ? Purchasing it either
for me or for my client is not a major consideration here ... what I'd
like to know is the stability, speed & ease of use of both the
products.
I believe Access 2007 has a new file format too and that it may be
slower.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |