datefield empty not empty Tom Schindl How do I create an empty datefield in database forms, normally it is always filled with actual date

At the moment this is only possible by registering a OO-Macro onto the "after reset"-event of the field's parentform and resetting the value of the field when form.isNew evaluates to true.

' Set the date field of the form to an empty value Sub _SetDateFieldToNull( Form As Object, FieldParent As Object, ColName As String ) ' only reset the date field if the record is new if Form.isNew Then FieldParent.GetByName(ColName).BoundField.updateNull() end if End Sub ' When the date field is part of a sub form the case will ' have to additionally check some more things Sub _SetSubFormDateFieldToNull( ParentForm As Object, ChildForm As Object, FieldParent As Object, ColName As String ) Dim bIsEmpty ' Let's see whether the parent form holds any values ' else we are running into troubles if not ParentForm.isBeforeFirst And ParentForm.isAfterLast Then bIsEmpty = true else bIsEmpty = false end if ' If the parentform is new the subform does not hold any values ' the same situation arises if the parent form does not hold any ' records if not ParentForm.isNew And not bIsEmpty Then _SetDateFieldToNull( ChildForm, FieldParent, ColName ) end if End Sub