Return without gosub access ошибка

  • Remove From My Forums
  • Question

  • I have a form that has a subform. whenever, I attempt to add records to this subform I receive the following message: The LinkMaster Fields Property setting has produced this error: «Return without GoSub»   How can I correct this?

Answers

  • Hi NoviceVBAuser1775,

    «Return without GoSub» means that
    you have a Return statement that can’t be matched with a GoSub statement.

    Make sure your GoSub statement wasn’t inadvertently deleted.

    You can get more detail about this error from link below:
    Return without GoSub (Error 3)

    This error is runtime error and it is a code issue. It means that complie will not address this issue. I suggest that you check code to see whether the code is correctly. For example, the code below will throw this error if we commnet the code «Exit
    Sub»:

    Sub TestError()
    
    Debug.Print "begin.."
    GoSub label1
    
    Exit Sub 'comment this line will cause this issue
    
    label1:
    Debug.Print "1"
    label2:
    Debug.Print "2"
    Return
    End Sub

    If you still have problem fixing this issue, I suggest that you share with us the code snippet you are developing with.

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

    • Edited by

      Friday, April 10, 2015 6:45 AM

    • Marked as answer by
      Fei XueMicrosoft employee
      Wednesday, April 15, 2015 12:23 PM

Why do I get a

«Return without GoSub»

error when using subforms in Access 2007?

asked Jul 13, 2012 at 9:29

Sinister Beard's user avatar

Sinister BeardSinister Beard

3,54412 gold badges58 silver badges94 bronze badges

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.

answered Jul 13, 2012 at 9:29

Sinister Beard's user avatar

Sinister BeardSinister Beard

3,54412 gold badges58 silver badges94 bronze badges

6

Performing a decompile of the VBA code and recompiling followed by compacting my database resolved the issue for me.

answered Apr 10, 2015 at 14:55

c_rugby's user avatar

2

I had something similar (not specifically in VBA, but with using a form to update a subform). I just added a «StopAllMacros» step at the end of the screen updating object and it seemed to work.

enter image description here

answered May 31, 2019 at 15:12

Chris's user avatar

ChrisChris

255 bronze badges

Permalink

Cannot retrieve contributors at this time

title keywords f1_keywords ms.prod ms.assetid ms.date ms.localizationpriority

Return without GoSub (Error 3)

vblr6.chm1011266

vblr6.chm1011266

office

396d3d0f-6af2-4709-bf3c-3a35668398d7

06/08/2017

medium

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.

Unlike For…Next, While…Wend, and Sub…End Sub, which are matched at compile time, GoSub and Return are matched at run time.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

[!includeSupport and feedback]

Почему я получаю ошибку «Возвращение без GoSub» при использовании подформ в Access 2007?

4b9b3361

Ответ 1

Это может произойти, если в подформе есть событие Form_Load(), но не основная форма. Попробуйте добавить пустое событие Form_Load() в основную форму.

Ответ 2

Наиболее вероятной причиной этой ошибки является то, что проект стал коррумпированным. Вы должны декомпилировать, инструкции здесь: Отладить ошибочную ошибку соглашения о вызове DLL

Во-первых, убедитесь, что вы отключили имя Autocorrect: http://allenbrowne.com/bug-03.html и убедитесь, что у вас отсутствуют какие-либо ссылки.

Ответ 3

Я нашел полезное решение (в моем случае) для этой же проблемы в http://www.fmsinc.com/microsoftaccess/performance/decompile.asp. Это работало для меня как прелесть.
НТН
Фил

Ответ 4

Выполнение декомпиляции кода VBA и перекомпиляция с последующим уплотнением моей базы данных разрешили проблему для меня.

Are you trying to use Microsoft Access, but are you getting the error message ‘return without gosub’?

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

On this page, you will find more information about the most common causes and most relevant solutions for the Microsoft Access error ‘return without gosub’. Do you need help straight away? Visit our support page.

Let’s get started

It has never been easier to solve error «return without gosub».

View list of solutions
Contact an expert

Error information

How to solve Microsoft Access error return without gosub

We’ve created a list of solutions which you can follow if you want to solve this Microsoft Access problem yourself. Do you need more help? Visit our support page if you need professional support with Microsoft Access right away.

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

Have you found a solution yourself, but it is not in the list? Share your solution in the comments below.

Need more help?

Do you need more help?

Tech experts are ready to answer your questions.

Ask a question

Понравилась статья? Поделить с друзьями:
  • Return to castle wolfenstein ошибка при установке
  • Return to castle wolfenstein ошибка opengl как исправить
  • Return to castle wolfenstein hunkusage dat ошибка
  • Return outside method java ошибка
  • Return of reckoning warhammer online ошибка