Hi all,
I have a working database that I built. Recently (on a copy) I added some more functionality to a table that stores vehicle model codes i.e. factory code that designates model, engine, gearbox, trim level etc.
The long model code that is stored in the table is a concatenation of several strings that all point to different parts of the vehicle. Usual stuff.
I needed to run a query relating each individual part of the string with another table, so in order to separate out the long code I added 11 calculated fields to the CODES table each with a simple expression such as MID$([LONGCODE],4,2) which takes characters 4 and 5 into their own field. I then use these fields as relationships to other tables that describe what each section means.
Everything works fine until I "Compact and Repair" the database. I get an MSysCompactError table which describes an error on the CODES table for every record. Access also deletes all the records in the CODES table without prompt. When using the in-built backup function this happens silently with no error table (good job I checked it before pushing it live!)
This is definitely related to the calculated fields since it was working correctly before I added them, and when I remove them it also works correctly with no error upon compact or backup.
My current workaround is that I've built the MID$ expressions into the SQL for the new query. However this is not an ideal situation for future editing by another user, especially when the original function works and is simple enough to stay in design view. Occam's razor and all that.
Does anybody have any ideas on how to stop the compacting error, or can elaborate on "Record is too large."? I have searched online but to no avail.
Thanks in advance
I have a working database that I built. Recently (on a copy) I added some more functionality to a table that stores vehicle model codes i.e. factory code that designates model, engine, gearbox, trim level etc.
The long model code that is stored in the table is a concatenation of several strings that all point to different parts of the vehicle. Usual stuff.
I needed to run a query relating each individual part of the string with another table, so in order to separate out the long code I added 11 calculated fields to the CODES table each with a simple expression such as MID$([LONGCODE],4,2) which takes characters 4 and 5 into their own field. I then use these fields as relationships to other tables that describe what each section means.
Everything works fine until I "Compact and Repair" the database. I get an MSysCompactError table which describes an error on the CODES table for every record. Access also deletes all the records in the CODES table without prompt. When using the in-built backup function this happens silently with no error table (good job I checked it before pushing it live!)
Code:
ErrorCode | ErrorDescription | ErrorRecid | ErrorTable
-1026 | Record is too large. | | CODES
My current workaround is that I've built the MID$ expressions into the SQL for the new query. However this is not an ideal situation for future editing by another user, especially when the original function works and is simple enough to stay in design view. Occam's razor and all that.
Does anybody have any ideas on how to stop the compacting error, or can elaborate on "Record is too large."? I have searched online but to no avail.
Thanks in advance