Return without GoSub error (1 Viewer)

zashaikh

Registered User.
Local time
Yesterday, 16:01
Joined
Apr 28, 2017
Messages
13
Hello.

Every time I try to open a form in my database I get an error message (see attached image).

If I click "OK", my form opens fine and Im able to input data, save, edit, etc. How do I stop this error from happening?

The last time I tried to fix it, I was told to decomepile/compact&compile. During the decompiling, I lost connection to the database. So when I tried to open it, it automatiically repaired itself and I lost ALL of my VBA...

After a week, I was able to get it back to were it was. But I still have the error.
 

Attachments

  • 1.JPG
    1.JPG
    28.3 KB · Views: 162

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 00:01
Joined
Jul 9, 2003
Messages
16,329
Comment out the code in the on load event and see what happens....
 

JHB

Have been here a while
Local time
Today, 01:01
Joined
Jun 17, 2012
Messages
7,732
Or post your database with some sample data, (zip it) + description to reproduce the error.
 

zashaikh

Registered User.
Local time
Yesterday, 16:01
Joined
Apr 28, 2017
Messages
13
Comment out the code in the on load event and see what happens....

What do you mean by "comment out the code on the load event"?

Are you suggesting that in the load event of the form, I click edit code, and enter some rubbish comment as such
{ 'Random Text }
 

isladogs

MVP / VIP
Local time
Today, 00:01
Joined
Jan 14, 2017
Messages
18,257
Hi

1. In response to Uncle Gizmo's comments, he means to add a ' at the start of each line of code in the Form_Load event. That will stop the code running.
You can remove all the ' later (preferably one line at a time) when you've seen what happens

2. Copy the db. Remove all data except for a few records and then replace all confidential data with something which allow us to investigate further without you forwarding anything breaking data security rules
 

zashaikh

Registered User.
Local time
Yesterday, 16:01
Joined
Apr 28, 2017
Messages
13
Hi

1. In response to Uncle Gizmo's comments, he means to add a ' at the start of each line of code in the Form_Load event. That will stop the code running.
You can remove all the ' later (preferably one line at a time) when you've seen what happens

Thank you. I actually had no code at all in the Form_Load event.. However, I added a random comment string use { ' }. And now the form loads without any errors...
 

Users who are viewing this thread

Top Bottom