Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 2128 on rebuild #552

Open
HughWarrington opened this issue Oct 22, 2024 · 7 comments
Open

Error 2128 on rebuild #552

HughWarrington opened this issue Oct 22, 2024 · 7 comments

Comments

@HughWarrington
Copy link
Contributor

I'm using addin version 4.0.34, Office 365 64-bit, Win10 64-bit.

I did a full export of my frontend .mdb, having set both the sanitise options to Off (I had to manually apply the fix for #537 first). Then took the .src folder and ran a Build As....

During the rebuild I got an error dialog:

Run-time error '2128':

Microsoft Access encountered errors while importing BackendCreate.

Here's some relevant info from the debugger at the line of code with the exception:

image

I'm afraid I can't upload the whole BackendCreate.bas file for commercial reasons. But it is notable that by alphabetical order, it is the first file inside the forms folder. In other words, it was probably the first form to be imported, suggesting a systematic error affecting all forms rather than just this one.

I didn't get this error until I changed the sanitise options to Off. Previously they were both set to Standard.

@hecon5
Copy link
Contributor

hecon5 commented Oct 22, 2024

I have also had this happen...and it turned out to be a reference in that file which didn't correctly load.

@joyfullservice: if you turn off Sanitize options, does the UTF8 conversion still happen? I thought it did, but now I'm not so sure.

@joyfullservice
Copy link
Owner

@joyfullservice: if you turn off Sanitize options, does the UTF8 conversion still happen? I thought it did, but now I'm not so sure.

Yes, the export file is written in UTF-8 regardless of the sanitize option used. Here is the line in SaveComponentAsText that writes the file as UTF-8. (The default encoding for the WriteFile function.)

image

@HughWarrington
Copy link
Contributor Author

More info. I've just found a file called errors.txt in the build directory:

Microsoft Access encountered an error while importing the object 'BackendCreate'.

Error encountered at line 39.
This property does not apply to this control.

Here is that line in BackendCreate.bas:
image

@joyfullservice
Copy link
Owner

Line 39 is removed automatically when sanitize is turned on.

Are you able to perform an export and build with Sanitize level set to Standard?

@HughWarrington
Copy link
Contributor Author

Are you able to perform an export and build with Sanitize level set to Standard?

Yes.

I only noticed the problem when I switched both levels to Off. I didn't try the Minimal or Extended levels.

This isn't a blocker for me. I only turned sanitisation off to see if it would help with #551.

@HughWarrington
Copy link
Contributor Author

Sorry I probably should have said sooner! The problem is specifically when sanitise is Off.

@joyfullservice
Copy link
Owner

No worries. I think removing the Sanitize -> None option should help other users avoid similar issues in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants