Vlad Shevchenko
Vlad Shevchenko

Reputation: 768

Character encoding in VBA editor

I have an MS Access database. All names (tables, field, data, etc.) are in Ukrainian. Both my Access and Windows are English. Here is what happens when I try to type a name of table in Ukrainian in VBA editor:

1

The same thing with all identifiers. And obviously this code doesn't work. Any way to fix it without renaming everything?

Upvotes: 5

Views: 1340

Answers (2)

Vlad Shevchenko
Vlad Shevchenko

Reputation: 768

I just finished my work with that database and came back here to say: if you faced such a problem - just change your system code-page. I tried to just rename my tables instead. And it was a mistake. You'll make your life much easier if you don't try to use MS Access DB with non-system language.

Upvotes: 1

ThunderFrame
ThunderFrame

Reputation: 9461

Unfortunately the VB Editor doesn't support Unicode, but rather uses the code-page of the current Windows language. In order to edit the code, you'll need to either change the names of the Access tables, queries and fields to English, or, change the Windows code-page to Ukrainian.

There was once a time when VBA supported locale-specific keywords, but the VBA language keywords, in modern VBA, are all in English.

My preference would be changing the Access names to English, but you might have other considerations.

Upvotes: 3

Related Questions