Closed kenjiuno closed 2 years ago
I wonder if it has something to do with your character mapping.
If you can't Debug.Print CurrentProject.Connection
or ?CurrentProject.Connection
(causes Access crash) in the immediate window, I'm suspecting it's Access's problem and has something to do with the character set / language interpretation.
Hi, thanks for reply!
I have tried to apply some English settings, however it doesn't help for now. For now I have no good idea to improve this situation, sorry:
I agree that this problem comes from Access's problem (this is not addin problem).
I see above that Access IDE is still showing Kanji when this happens; it's making me suspect it refuses to change, and that the language interpenetration is at fault here. After you change language settings, does Access still show in Japanese? If so, I'm flummoxed as to why, and also how to change it.
I see above that Access IDE is still showing Kanji when this happens; it's making me suspect it refuses to change, and that the language interpenetration is at fault here. After you change language settings, does Access still show in Japanese? If so, I'm flummoxed as to why, and also how to change it.
Yes, Access continuously displays Japanese on English locale/display language.
Technically it is possible to display Japanese characters upon English system locale and English display language environment. Using Unicode version of Windows API will help it. For example, TextOutW.
The main reason of displaying Japanese texts in Access is that I have installed Japanese version of Microsoft Access. It is possible that Access setup deployed only Japanese text assets to Windows (English text asset is missing).
@kenjiuno - Thanks for reporting this! The CurrentProject.Connection
is actually an object, so it wouldn't normally print anything to the debug window. It is also a remnant from the ADP project support that was discontinued after Access 2010.
The references to this object has been removed in the dev
branch, so it won't create any problems in version 4 and beyond. (Unless you are actually exporting from an ADP project, which would not be the case in any version after 2010)
To fix this in version 3.4.20, you will want to remove the references to this object since it is not relevant to your version of Access. I believe this will fix the issue for you, and avoid the crash that you are experiencing.
Here is how you can fix it:
And CurrentProject.Connection Is Nothing
with `` as shown in the following screenshot:(There should be four occurrences replaced.)
Following the above steps should allow you to hot-fix your copy of the add-in. That is one thing that I really like about having this add-in in this format. It makes it easy to adjust the source code and reinstall it on your system.
Let me know if you have any problems after making this change. 👍
Interestingly enough: CurrentProject.Connection property (Access) (updated Jan 2021) says that it's still an active component. Instead of an ADP connection, it now returns the Active X (ADODB) connection. We still use it in some of our databases (all 365 or Access 19), so it definitely works.
The default member of CurrentProject.Connection
is ConnectionString
, which I think is the crux of the issue, or a symptom. I can't tell. But I think the issue is due to something with language and Access installation.
I also found a page on FMS which points to this same symptom (Can't access CurrentProject.Connection
).
Then there's this OLD SO Thread: Why do VBA CurrentProject.Connection statements cause all my access databases to crash? which makes me think even more so that the install is borked, or has something to do with a missing language pack.
Removing the reference in the Addin will definitely get him going for now, but I think the fact it's not there is a symptom of other issues to be found later.
Thanks @hecon5! Those are some helpful links.
Hi @joyfullservice
Thanks, I could apply workaround (removing And CurrentProject.Connection Is Nothing
) successfully, and now I could export database structure to filesystem I was going to do! This VCS addin will help so much, thanks again!
ps. here is an unrelated topic, sorry if you might know that: pressing SHIFT key before opening Access will skip AutoExec
macro.
Bypass startup options when you open a database
Hi, thanks for providing great add-in! I want to see this add-in workable on Access 2019 (64-bit)
I'm trying to use on:
My steps:
Version Control.accda
→ no problemInstall Add-In
prompt appears → no problemAddin
→ click one ofVCS Options
/VCS Open
/VCS Export All Source
, and then Access crashesI debugged add-in.
It seems that reading from
CurrentProject.Connection
immediately leads to crash.Alternatively reading from
CurrentProject.IsConnected
seems to be safe (no crashing) for now.This behavior is not related with add-in. Probably this is Access's problem.
As a workaround I have replaced
CurrentProject.Connection Is Nothing
withNot CurrentProject.IsConnected
wherever it can be applicabled. And this workaround seems to work on my environment.This problem is specific to me? Otherwise anyone having this kind of problem too?