Return Sans GoSub

Solved
Bapti -  
 Bapti -
Hello everyone,
As a beginner in Access, I just created a customer management database that also allows me to create quotes. Everything is done without any code, I only use the wizards, etc.
My quote form throws me an error message, only after reopening the database, saying "Return without GoSub."

In my quote form, there are simply the elements of the quote itself, a read-only subform displaying 2-3 details about the client's company, and a subform containing various elements of my quote (upon selecting my product reference, the fields for price, description, etc. take the default values from the catalog).
It works perfectly the first time, and every time thereafter as long as I don't close my database.
As soon as I reopen it and try to add an item to a quote, I get the following message "The parent field property parameter is causing the following error: 'Return without GoSub'"
(The parent field of my subform is my Quote Number)

In addition, when I want to preview the report linked to my quote form (made from a query on the Quote Number of the quote form), instead of opening it, it opens a dialog box asking for the Quote Number...

After which, I have to manually enter the Quote Number in my subform line to finally write the line. (If I delete and reinsert my Quote Number field in the main form, the form works again until the next closure)

Given the error message, I suspect a misconfigured parameter on my Quote_Number field. But I have no certainty. Do you have any ideas?

Thank you in advance!

Baptiste

Configuration: Windows / Firefox 76.0

5 réponses

yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   Ambassadeur 1 588
 
Hello, let's move on to the second issue:
if I understand correctly, your quote form is based on a query whose name you haven't provided. What happens when you open this query?
0
Bapti
 
My Quote Form is based on my Quotes table and calls a read-only SF based on my Clients table, and another SF based on the Elements_quote table (which contains the different items of the quote).
However, my Report that allows me to create a nice printable quote is based on a query (R_quote_for_report) in which I call all the fields from the 3 tables mentioned above, and where I simply set the criterion for the Quote_Number: " [Forms]![Quote]![Quote_Number] "

This error only appears when restarting the DB; prior to that, the complete form works perfectly. This leads me to believe that I have this "parameter" issue with my Quote_Number field, causing it to disappear from detection upon restarting, as if my form is unaware of its presence!

Thank you!
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
what happens if you open the request R_devis_pour_etat?
it is better not to use the same names everywhere, as it complicates understanding in case of a problem.
0
Bapti
 
If I open my database, without my Quote form being open, then a pop-up window opens and asks me for the value of [Forms]![Quote]![Quote_Number]. If I do this while the Quote form is open on a record, then the query returns the different elements of the open quote in the form.

If I close and reopen Access, then even when my quote form is open, if I click on my query it asks me for the value of [Forms]![Quote]![Quote_Number]. If I go to my Quote form, then delete my Quote_Number control and reinsert it, then my query works again.

PS: Regarding the names, do you mean that my key Quote_Number should not be called that in other tables where it is in multiple references?
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
I suggest the following:
- do not use identical names in different places, so as to easily recognize the context
- do not use special characters in names, which also helps avoid putting [] around names
- try to be precise. at first, you wrote "it opens a dialog box asking me for the quote number", now it has become "it asks me for the value of [Forms]![Quotes]![Quote_Number]"

- you mention "the Quotes form is open on a record", and then "my quotes form is open": are they identical?
- how do you arrive at the first situation you describe (If I do it when the Quotes form is open), without falling into the second situation (even when my quotes form is open)? it seems to me that you only describe part of the scenarios.
0
Bapti
 
Thank you for the advice, okay I understand that my explanations can be confusing:
I will try to clarify:
After designing my Quote Form, I test it, and it allows me without any problem to:
- Enter data into my Quote_Elements_Subform and save it
- Click on a button that opens a report based on a query named R_quote_for_report
- Open the query R_quote_for_report, automatically filtered on my Quote_Number present on my active Quote form. Naturally, if I close my Quote form and then click on my query, it opens a pop-up window that asks me for the value of [Forms]![Quote]![Quote_Number] before displaying a result.

This is the normal and expected behavior of my application. This behavior persists as long as Access is open. I can navigate through my application without any issues; it functions flawlessly.

If I close Access and then reopen it (on my database of course), here is the behavior I get:
- When I want to enter data into my Quote_Elements_Subform, as soon as I have entered my first character in a control of this subform, a pop-up window appears with the following error: “The parameter of the parent field property is causing the following error: 'Return without GoSub'.” I can click OK to close the error; if I try the same thing, the error reappears. Furthermore, I notice that the child field (which retrieves the Quote_Number from my Quote form) has not filled automatically (whereas it used to fill automatically in the first situation, as soon as I filled another field). The only way to fill the subform is to manually enter the child field of this subform.
-When I want to click on the button that opens a report based on a query named R_quote_for_report, it opens a pop-up window asking me for the value of [Forms]![Quote]![Quote_Number], if I fill in the field with a Quote_Number value (any existing value in my table), it opens my corresponding report for the called Quote_Number.
- If I try to open the query R_quote_for_report, it opens a pop-up window asking me for the value of [Forms]![Quote]![Quote_Number] before displaying a result, whether my Quote form is open or not.

Now, if I go to my Quote form in design mode, delete the Quote_Number control from my form, and then re-add it, the entire system starts working again according to its normal and expected behavior.

At the next reopening, it will crash again.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 588
 
Can you, after taking a copy of your database (for safety), "compact/repair" your file and then test again?
If that doesn't work, can you share your file?
0
Bapti
 
Hello Yg_be
I compacted/ repaired my file, without success.
But I also saved my database as an executable database, and in that case, the form runs perfectly. Which is ultimately what I needed. Thank you for the help anyway!
0