Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Return without GoSub" when using subforms in Access

Why do I get a

"Return without GoSub"

error when using subforms in Access 2007?

like image 404
Sinister Beard Avatar asked Jul 13 '12 09:07

Sinister Beard


People also ask

What does return without GoSub mean?

A Return statement must have a corresponding GoSub statement. This error has the following cause and solution: You have a Return statement that can't be matched with a GoSub statement. Make sure your GoSub statement wasn't inadvertently deleted.


1 Answers

This can occur when there is a Form_Load() event in the subform, but not the main form. Try adding an empty Form_Load() event to the main form.

like image 113
Sinister Beard Avatar answered Sep 17 '22 17:09

Sinister Beard