Solved Strange Form Behaviour (1 Viewer)

LanaR

Member
Local time
Tomorrow, 02:43
Joined
May 20, 2021
Messages
113
In a long-term DB, I have a search from that had been working flawlessly. However, when I opened the DB this morning and tried loading the form I got a series of "Enter Parameter Value" dialogue boxes (relating to controls on the form) culminating in an "Error 3 Return without GoSub!", then when the form does open it has all sorts of errors.

Now if I open the form in design view and place a Break Point in either the On Load or On Current event(s) and step through the code or simply resume the code, the form returns to working as expected. I can then remove the break point and close and open the form as much as I like without an issue. If however I close and re-start the DB the aberrant behaviour returns until I once again go through the procedure of placing a break point in the code, then removing once the code has run once.

A little background, we did have a power outage last night and this behaviour has appeared since then. I am currently at a loss to figure out what is causing this behaviour and how to rectify it 😰
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:43
Joined
Oct 29, 2018
Messages
21,358
Hi. Just in case the db got corrupted, perhaps it would be easier to just replace it with a good backup copy.
 

LanaR

Member
Local time
Tomorrow, 02:43
Joined
May 20, 2021
Messages
113
Thanks; I guess that will teach me to be more diligent with my back-up procedures 😢 my last back-up is less than four months old but I've made some significant changes to the form in the meantime 😭
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:43
Joined
May 21, 2018
Messages
8,463
I would try to decompile the code before giving up.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:43
Joined
May 7, 2009
Messages
19,169
I've made some significant changes to the form in the meantime
never modify an object other on the original language/bitness where the db was created.
 

LanaR

Member
Local time
Tomorrow, 02:43
Joined
May 20, 2021
Messages
113
I've resolved the problem by renaming the old form, making a copy of it and naming that with the original name.

I can't even imagine how that fixed things, as the old form continued to show its aberrant behaviour if it was opened first but would work fine if the copied and re-named version was opened first 😵
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:43
Joined
May 21, 2018
Messages
8,463
When things start acting strange, for me it is time to start cleaning up and start fresh. I do it pretty often when designing something that takes a lot of work.

0. Save the most current copy as backup
1. Decompile and Recompile
2. Compact and repair
3. Create a brand new database and import all the tables
4. Compact and repair again
5. Import all the remaining objects (forms, reports, modules)
 

LanaR

Member
Local time
Tomorrow, 02:43
Joined
May 20, 2021
Messages
113
@MajP thanks I think it is probably well past time that I did a major re-build on this DB
 

Users who are viewing this thread

Top Bottom