ник: ddi
Private Sub save___print_Click()
On Error GoTo save___print_Click_Err
Dim i
If (IsNull(aah)) Then
DoCmd.RunMacro "eror.4", , ""
DoCmd.GoToControl "AAH"
Exit Sub
End If
If (IsNull(Hasce)) Then
DoCmd.RunMacro "eror.5", , ""
DoCmd.GoToControl "hasce"
Exit Sub
End If
If (IsNull(sum) Or sum = 0 Or sum < 0) Then
DoCmd.RunMacro "eror.3", , ""
DoCmd.GoToControl "sum"
Exit Sub
End If
If (IsNull(npatak)) Then
DoCmd.RunMacro "eror.6", , ""
DoCmd.GoToControl "Npatak"
Exit Sub
End If
If data < date Then
DoCmd.RunMacro "eror.7", , ""
DoCmd.GoToControl "data"
Exit Sub
End If
If (IsNull(order)) Then
Beep
Exit Sub
End If
On Error Resume Next
If (Form.Dirty) Then
DoCmd.RunCommand acCmdSaveRecord
End If
If (MacroError.Number <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
Exit Sub
End If
On Error GoTo 0
DoCmd.OpenReport "nandor", acViewNormal, "", order, acNormal
""""""""""""""""DoCmd.GoToRecord acForm, "n", acNewRec """"""""""""""""( пишет ошибку Eror 2046 The command or action "gotorecord" isnt acalible now)
DoCmd.GoToControl "aah"
save___print_Click_Exit:
Exit Sub
save___print_Click_Err:
MsgBox Error$
Resume save___print_Click_Exit
End Sub