Be aware that,
Code:
Private Sub Príkaz43_Click() 'ulozit
If IsNull(NazevFirmy) Then
MsgBox ("Musíte zadat název firmy.")
Else
DoCmd.Close acForm, "frmDEObchodniTrychtyr", acSaveYes
DoCmd.OpenForm "frmObchodniTrychtyr"
End If
End Sub
the "acSaveYes" does NOT save the data, it is asking if you want to save changes to the DESIGN of the object (in this case a Form). The data is automatically saved.
So you do not need it in the command .... Use
Code:
DoCmd.Close acForm, "frmDEObchodniTrychtyr"
Same goes for the close command in
Code:
Private Sub Príkaz54_Click() 'zrusit
Me.Undo
DoCmd.Close acForm, "frmDEObchodniTrychtyr", acSaveNo
DoCmd.OpenForm "frmObchodniTrychtyr"
End Sub