jeudi 2 février 2017

Out of stack space - Run time error '28'

I want to check that all fields are filled and if field [Status predmeta] is "Završeno" then I want to have checkbox called [Predmet zaključan] to be unlocked.

First function I put on every textbox in change event and second function on [Status predmeta] on change event.

When I fill all fields and set [Status predmeta] to "Završeno" I get that "Out of stack space - Run time error '28'" and when I click debug It shows me line marked in second funtion.

Function checking if all fields are not null (I set in settings allow zero length to "No" for all fields) if true than function is true else function is false.

    Public Function provjerapolja() As Boolean

If Not IsNull(Me.Naziv_tvrtke) And Not IsNull(Me.Ime_korisnika) And Not IsNull(Me.Prezime_korisnika) And Not IsNull(Me.Adresa_korisnika) And Not IsNull(Me.Telefon) And Not IsNull(Me.Mail) And Not IsNull(Me.Vrsta_uredaja) And Not IsNull(Me.Model) And Not IsNull(Me.Lokacija) And Not IsNull(Me.Datum_ugradnje) And Not IsNull(Me.Datum_dogovorenog_servisa) And Not IsNull(Me.Opis_kvara) And Not IsNull(Me.Napomene) And Not IsNull(Me.Nalog_dodijeljen) And Not IsNull(Me.Broj_radnih_sati) And Not IsNull(Me.Udaljenost) And Not IsNull(Me.Obavljeni_radovi) And Not IsNull(Me.Status_predmeta) And Not IsNull(Me.Otpremnica) And Not IsNull(Me.Broj_otpremnice) And Not IsNull(Me.Račun) Then
provjerapolja = True


    If provjerastanja = True Then
    [Predmet zaključan].Locked = False
        End If
Else
provjerapolja = False

End If
End Function

Function checking if [Status predmeta] is different than "Završeno" and than calling provjerastanja

Public Function provjerastanja() As Boolean

If [Status predmeta] <> "Završeno" Then
provjerastanja = False

ElseIf [Status predmeta] = "Završeno" Then
provjerastanja = True


    If provjerapolja = True Then   <--- Debug showing this line as error
    [Predmet zaključan].Locked = False
    End If


End If
End Function

Aucun commentaire:

Enregistrer un commentaire