Domino 9 und frühere Versionen > ND6: Entwicklung
Problem mit Dokument Berechtigungen
judicious:
Ach so, nein sorry, das war mein Fehler. Es geht so wie es jetzt oben steht nicht.
koehlerbv:
Jetzt wird es langsam unüberschaubar.
Wenn Du mit dem "das was oben steht" Posting #26 meinst, dann funktioniert der Code dahingehend, dass beim ersten Zutreffen eines Vergleichs eine Meldung ausgegeben wird, und dann wird das Dokument gespeichert. Wie in #27 beschrieben.
Axels Posting #25 zeigt das gängige und funktionierende Verfahren.
Bernhard
judicious:
Axels Posting #25: Ja und wie soll ich das jetzt für mehrere Felder machen? So wie ich es in Posting #26 gemacht habe oder?
Axel:
--- Zitat von: judicious am 20.02.06 - 16:48:16 ---Axels Posting #25: Ja und wie soll ich das jetzt für mehrere Felder machen? So wie ich es in Posting #26 gemacht habe oder?
--- Ende Zitat ---
Genau. Nur musst du nach jeder Messagebox ein Continue = False einfügen.
Sub Querysave(Source As Notesuidocument, Continue As Variant)
'Created on 13.02.06 by someone
Dim ThisDoc As NotesDocument
Set ThisDoc = Source.Document
'Checks the mandatory fields and stops saving if a field is empty
If Source.FieldGetText("country") = "" Then
source.GotoField("country")
Messagebox "Country field is empty", 0 + 48, "Failure"
Continue = False
Exit Sub
End If
If Source.FieldGetText("city") = "" Then
source.GotoField("city")
Messagebox "City field is empty", 0 + 48, "Failure"
Continue = False
Exit Sub
End If
If Source.FieldGetText("location") = "" Then
source.GotoField("location")
Messagebox "Location field is empty", 0 + 48, "Failure"
Continue = False
Exit Sub
End If
If Source.FieldGetText("detail") = "" Then
source.GotoField("detail")
Messagebox "Detail field is empty", 0 + 48, "Failure"
Continue = False
Exit Sub
End If
If Source.FieldGetText("Description") = "" Then
source.GotoField("Description")
Messagebox "Description field is empty", 0 + 48, "Failure"
Continue = False
Exit Sub
End If
End Sub
Axel
judicious:
Ja nur kommt der Fehler dann immer noch, es lässt sich zwar nicht speichern, aber der Fehler bleibt der selbe. Zurzeit habe ich etwa die 10te Version vom Code drin, aber der Fehler will und will nicht weg :-[
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln