All I want to do, is require to fill one control in subform in my form "FrmZlecenia".
It is not simple because, I'm using overlap to navigate between active Forms.
I wrote some code, but it works every other time and I don't know why.
Is there anyone who can help me with this?
With this code if user doesn't fill control "nazwa" and goes to another form which is open, the code will move view and focus to "frmZlecenia" form. But it works every other time - This is really strange
It is not simple because, I'm using overlap to navigate between active Forms.
I wrote some code, but it works every other time and I don't know why.
Is there anyone who can help me with this?
With this code if user doesn't fill control "nazwa" and goes to another form which is open, the code will move view and focus to "frmZlecenia" form. But it works every other time - This is really strange
Code:
Form_Deactivate()
If Len(Nz(Forms!frmZlecenia!frmGoraZlecenia.Form!Nazwa)) = 0 Then
If MsgBox("Please fill 'Nazwa'", vbOKOnly, "notice") = vbOK Then
DoCmd.OpenForm "FrmZlecenia"
Forms!frmZlecenia!frmGoraZlecenia.Form!Nazwa.SetFocus
End If
End If
end sub