Access error 2450 impossible to find a subform "etc, etc, etc,"

Copper Contributor

Dear,

I developed a Access 2019cdatabase (bought on December 2021) and it working fine. now  I have problem with it. Returned ccess error 2450 impossible to find a subform "etc, etc, etc,". an I help me?

 

Regards

FB

16 Replies

@bertinofra Unfortunately, that's not nearly enough information to offer any suggestions. WHERE and WHEN does this error appear? Describe the situation in terms of steps you take, not the outcome or results. That way it's more likely someone will be able to figure out what problem might be present.

 

HI, Thank you for your cooperation. When I develod the application it workin fine. Now , at open principal forms, it returned me 2450 error Impossibe to find a subform (it is present on principal form), but I cannot to control with code this subfolder.
Access error 2450 how resolve it?

@bertinofra 

 

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.

@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. 

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

Access FAQ italiano

There 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
I was hoping Karl would be available since he speaks Italian, which makes it easier to.

That said, I wonder if you can confirm whether the name of the subform CONTROL is sottomaschera_512C as well as the subform in that subform control.

Hi,

 

@George: As long as the question is in English I answer in English. I just offered to do it in Italian if it's easier for the poster, but certainly most readers here speak English.

 

1. The pictures you posted showed code in the dblclick event of the first subform with wrong references to the second subform. Have you read and tried what I suggested as solution?

 

2. The code you showed now doesn't make sense. It uses two times the same name for main form and sub form and it would replace 0 by Null in the same field when the record becomes the active record. --> ?

 

Servus
Karl

-------------
Access News
Access DevCon

Agreed, Karl. I was just looking at the names of objects and thinking I'd be more likely to miss a key point, which would be worse.
Buongiorno,
visto che posso esprimermi in italiano, Vi spiego quale è il mio problema: Ho fatto un database, che, funzionava benissimo. si tratta di una gestione di Magazzino Parti. Il suddetto, formato da una form principale "Lista_Parti_IER512C" e due sottomaschere "Sottomaschera_512C" e "Prelievo Parti". L'automazione, consiste dalla selezione da "Sottomaschera_512C", tabelare di codici prodotto (su evento doppio click) e l'aggiunta dello stesso nella maschera "Prelievo_Parti" anch' essa taabellare. Con il pulsante "Chiudi Ordine", viene automaticamente stampato, inviato via Mail e la tabella "Prelievo_Parti" viene svuotata da una query di eliminazione. Da un paio di settimane, all'apertura della maschera principale "Lista_Parti_IER512C", mi viene restituito l'errore "2450, impossibile trovare la sottomaschera "Sottomaschera_512C", la quale, è presente.











Salve,

 

Non hai risposto alle mie domande e suggerito soluzioni. Ecco li ripeterò in italiano:

 

Le 2 sottomaschere sono situate indipendentemente l'una dall'altra nella maschera principale. Non sono annidati. Vero? Se sì:

 

Il codice che aveva la linea di errore gialla nella tua immagine contiene un riferimento errato alla sottomaschera. Invece di

 

Forms!Sottomaschera_512C!Prelievo_Parti.SetFocus
si dovrebbe leggere
Forms!Lista_Parti_IER512C!Prelievo_Parti.SetFocus

 

Lo stesso vale per le seguenti righe di codice.

 

Poi hai postato questo come codice nell'evento Current della Sottomaschera_512C:

 

If [Forms]![Sottomaschera_512C]![Sottomaschera_512C]![Disponibilità] = 0 Then
[Forms]![Sottomaschera_512C]![Sottomaschera_512C]![Disponibilità] = Null
End If

 

Questo codice è incomprensibile perché usa lo stesso nome "Sottomaschera_512C" per la maschera principale e per la sottomaschera, il che non è possibile. Anche il suo scopo non è chiaro, ma questo non dovrebbe causare un errore.

 

Se [Forms]![Sottomaschera_512C]![Sottomaschera_512C]![Disponibilità]

sarebbe un riferimento alla sottomaschera stessa, cioè quella in cui si trova questo codice, allora dovrebbe essere:


Forms!Lista_Parti_IER512C!Sottomaschera_512C![Disponibilità]
o più semplice
Me![Disponibilità]

 

Ciao
Karl

-------------
Access News
Access DevCon

Access FAQ italiano

 

Allora le maschere non sono annidate. HO sostituito il codice con ciò che mi proponi:
If Me![disponibilià] = 0 Then
Me![Disponibilità] = Null
End If

ma mi restituisce il seguente:
Errore di run-time '2465':
Microsoft Access: impossibile trovare il campo 'disponibilità' a cui viene fatto riferimento nell'espressione.
FB

Salve,

 

Beh, almeno con l'errore sei già al campo individuale invece della sottmaschera. ;)
Qui solo tu puoi sapere come si chiamano e dove si trovano i tuoi campi e a quali oggetti si riferisce il tuo codice.

 

Ciao
Karl

-------------
Access News
Access DevCon

Access FAQ italiano

Hi @bertinofra 

 

Here is the workaround that can manually fix this Runtime Error 2450 Cannot Find The Referenced Form Error:

  • Switch on your system and sign in as an administrator.
  • Hit the Start button then choose All Programs > Accessories > System Tools > and then go for the System Restore option.
  • In the fresh window, opt for the “Restore computer to an earlier time” option and then hit Next.
  • Select the most current systems to restore points from the “On this list, click a restore point” list, and then press Next.
  • Then press Next on the verification window.
  • Reboot the system when the restoration is ended.

Thanks!