CanuckBuck
Registered User.
- Local time
- Today, 15:14
- Joined
- Apr 27, 2019
- Messages
- 31
I'm converting a solution from an Access data project (.adp file extension) to an Access database (.accdb file extension).
In my .adp file I have a bit of like so;
In my .adb file this code works fine (has done so for years).
I thought that I'd be able to copy this to my .accdb file, include the appropriate references (which I have done, as far as I can tell) and that this code would work.
When I run this code in my .accdb file I get an error message saying
Does anyone know why this is happening?
If it would help, I can include the whole subroutine. It's rather long. It takes a list of record Ids supplied by a user, looks up records in a database external to the one I'm developing and returns related information.
Thanks in advance for any assistance you can provide.
In my .adp file I have a bit of like so;
Code:
Dim con As ADODB.Connection
<Some code>
Set con = New Connection
<Some code>
In my .adb file this code works fine (has done so for years).
I thought that I'd be able to copy this to my .accdb file, include the appropriate references (which I have done, as far as I can tell) and that this code would work.
When I run this code in my .accdb file I get an error message saying
"Compile Error: Invalid use of New keyword"
Does anyone know why this is happening?
If it would help, I can include the whole subroutine. It's rather long. It takes a list of record Ids supplied by a user, looks up records in a database external to the one I'm developing and returns related information.
Thanks in advance for any assistance you can provide.