Forum Discussion
Access error 2450 impossible to find a subform "etc, etc, etc,"
The error message indicates that a subform is not where the code expects to find it. Could you SHOW the code? Not just explain what it is supposed to do? Also a screenshot of the form in DESIGN view would be helpful.
- bertinofraFeb 15, 2022Copper Contributor
- Feb 15, 2022
Salve,
From your pictures it looks as if the subform wouldn't be in "Sottomaschera_512C" but in the main form. So the code would have to be:
Forms!Lista_Parti_IER512C!Prelievo_Parti.SetFocus
etc.
Se questo non ti aiuta e la descrizione in italiano è più facile per te, allora vai avanti. Siamo poliglotti qui.
Ciao
Karl-------------
Access News
Access DevCon- bertinofraFeb 15, 2022Copper ContributorThere is a principal multicolors form (Lista_Parti_IER512C), with 2 subforms (sottomaschera_512C and Prelievo_Parti). At Current event of subform sottomaschera_512C here is follow code:
If [Forms]![Sottomaschera_512C]![Sottomaschera_512C]![Disponibilità] = 0 Then
[Forms]![Sottomaschera_512C]![Sottomaschera_512C]![Disponibilità] = Null
End If
Only this it returned access error 2450 Impossible to find form Sottomaschera_512C.
Thank you for your cooperation
- George_HepworthFeb 15, 2022Silver Contributor
bertinofra Thank you.
From the screen shot, it appears that there are actually two different subforms, correct? The main form has the multicolored background and one control. The upper subform has records in it and the lower form has none, Correct?
It's not clear from the screenshot where the Double-Click event runs. If it's from the main form, then it looks like the highlighted line is trying to set focus to one of the two subforms, correct?
Is that where the error is raised? The error itself isn't included.....
IF so, then you have to be sure the subform control in which the subform is embedded is specified in that highlighted line, NOT the subform itself. They may or may not have the same name. It's usually better to name them differently to disambiguate.