Predmet:Re: Problem sa Close button-om
   
Ne treba
Dim isEmpty, isRequired As Boolean
Nego
Dim isEmpty As Boolean, isRequired As Boolean
U prvom slucaju isEmpty je tipa variant
Greska je bila
    If (Me.Dirty) Then
        If (IsRecordValid = False) Then
            If DiscardChanges Then
                Me.Undo
                DoCmd.Close
            End If
        End If
    Else
        DoCmd.Close
    End If
Treba
    If (Me.Dirty) Then
        If (IsRecordValid = False) Then
            If DiscardChanges Then
                Me.Undo
                DoCmd.Close
            End If
            Else
            Me.Dirty = False  'ako zelis da sacuvas izmanjen record
            DoCmd.Close acForm, Me.Name
            End If
        
    Else
       
       DoCmd.Close acForm, Me.Name
    
    End If
Šta želiš da zatvoriš, formu ili aplikaciju?
Ako želiš samo formu onda treba 
me.close acForm, Me.Name   
   Ovaj post je ureden   
1
   puta. Posljednja izmjena 13.01.2018 19:36 od strane dex.