Code Gone Missing!!! (1 Viewer)

George-Bowyer

Registered User.
Local time
Today, 21:18
Joined
Dec 21, 2012
Messages
177
Fired up my working copy of my db this morning, whole reams of code have vanished... :eek::eek::eek:

Entire forms now with no procedures.

There yesterday, gone this morning.

Fortunately my backups are ok - but what the heck...?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:18
Joined
May 21, 2018
Messages
8,519
There is one and only one way to do this. You clicked the has module property to no then saved the form. This did not happen on its on and is not related to corruption IMO.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:18
Joined
Sep 12, 2006
Messages
15,634
I have had that in the past from time to time. Corruption leading to lost code. Also mods to forms leaving the forms unusable, having to be deleted, recovered from old versions etc. I have even had to resort to having multiple versions of gradually changing forms to have a partly modded form as a starting point, until I reached the finishing post.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 16:18
Joined
May 21, 2018
Messages
8,519
I have never seen corruption leading to lost code and the form still working, but have seen the rest. Either way you are probably correct.
1. Decompile the database. Recompile. Google if you do not know how. Compact and repair alone will do nothing.
2. Create a new database and import all objects into it
3. Compact and repair
 

Minty

AWF VIP
Local time
Today, 21:18
Joined
Jul 26, 2013
Messages
10,367
I too have had code vanish.
I recently lost a report that I had spent nearly a whole day on and although I had backups from throughout the day they were all corrupt.
It had obviously gone "Wonky" early doors but was still working until I closed Access completely.

Very weird and very frustrating.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:18
Joined
Feb 19, 2013
Messages
16,600
It's happened to me - corruption was caused on a db on the server I was modifying which I had inadvertently connected to wirelessly. All code disappeared - forms, reports and modules. Fortunately had a backup and only lost the last change I'd made. Embarrassing thing was I was in a meeting and hoping to say 'change made!' before the end of the meeting
 

Umpire

Member
Local time
Today, 13:18
Joined
Mar 24, 2020
Messages
120
It's happened to me - corruption was caused on a db on the server I was modifying which I had inadvertently connected to wirelessly. All code disappeared - forms, reports and modules. Fortunately had a backup and only lost the last change I'd made. Embarrassing thing was I was in a meeting and hoping to say 'change made!' before the end of the meeting
My database is on a server and I have no option other than connecting through wifi. It sounds like this is a bad thing. What do I need to watch for and what protective measures can I take?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:18
Joined
Feb 19, 2013
Messages
16,600
Sorry wasn't really clear enough - I was talking about developing the front end not the database which will be fine on the server (although safer to use sql server if connection is wireless). If this is what you mean, copy front end to your local drive, work on it there then copy back to to the server - make sure you keep good notes on versions.

Note that nobody should be running the front end copy on the server as there is a risk of sharing or connecting wirelessly, they should all have their own copy on their local machine - or using something like terminal server or citrix which they log in to and have their own workspace.

the database (back end) should always be separate from the front end (forms/reports/etc) for ease of maintenance and absolutely essential if the app is multi user
 

Umpire

Member
Local time
Today, 13:18
Joined
Mar 24, 2020
Messages
120
Sorry wasn't really clear enough - I was talking about developing the front end not the database which will be fine on the server (although safer to use sql server if connection is wireless). If this is what you mean, copy front end to your local drive, work on it there then copy back to to the server - make sure you keep good notes on versions.

Note that nobody should be running the front end copy on the server as there is a risk of sharing or connecting wirelessly, they should all have their own copy on their local machine - or using something like terminal server or citrix which they log in to and have their own workspace.

the database (back end) should always be separate from the front end (forms/reports/etc) for ease of maintenance and absolutely essential if the app is multi user
Thank you. I may be able to use this information to push for a wired connection to be added to my work area.
 

Users who are viewing this thread

Top Bottom