Annulering af handling
Hvorfor bliver .addnew annulleret? Der er tale om felter bundet til en tabel ..Private Sub AftaleOpret_Click()
If IndtastAftale.Titel = \"\" Or IndtastAftale.AftaleDato = \"\" Or IndtastAftale.TidFra = \"\" Or IndtastAftale.TidTil = \"\" Or IndtastAftale.Bemaerkninger = \"\" Then
MsgBox \"Ingen tomme felter tillades!\", vbCritical + vbOKOnly
Else
AftaleData.Recordset.AddNew
AftaleData.Recordset(\"Titel\") = IndtastAftale.Titel
AftaleData.Recordset(\"AftaleDato\") = IndtastAftale.AftaleDato
AftaleData.Recordset(\"TidFra\") = IndtastAftale.TidFra
AftaleData.Recordset(\"TidTil\") = IndtastAftale.TidTil
AftaleData.Recordset(\"Bemaerkninger\") = IndtastAftale.Bemaerkninger
AftaleData.Recordset.Update
MsgBox \"Aftale Oprettet d. \" & AftaleDato & \" !\", vbOKOnly
End If
End Sub
