G
Guest
I am trying to copy two fields from the previous record as default values for
the new record. These are contained on a subform on my form. One field is a
date; one field is numeric.
I have tried 2 approaches -- one using DLookUp() as the default value
property. After consulting several books, I never got the terminology right.
My second approach works for the numeric field, but not the date field. In
the After Update property, I have this procedure:
Private Sub Date_AfterUpdate()
Forms![Data Entry Form]![Newspapers]![Date].DefaultValue = Forms![Data
Entry Form]![Newspapers]![Date]
End Sub
This procedure returns the correct date as shown on the date field, but it
is always entered as 30 Dec 1899 in the subform. Is it being treated as a
string?? How can I fix it?? I hope some angel can help, as I have spent 2
frustrating weeks on this. Thanks.
the new record. These are contained on a subform on my form. One field is a
date; one field is numeric.
I have tried 2 approaches -- one using DLookUp() as the default value
property. After consulting several books, I never got the terminology right.
My second approach works for the numeric field, but not the date field. In
the After Update property, I have this procedure:
Private Sub Date_AfterUpdate()
Forms![Data Entry Form]![Newspapers]![Date].DefaultValue = Forms![Data
Entry Form]![Newspapers]![Date]
End Sub
This procedure returns the correct date as shown on the date field, but it
is always entered as 30 Dec 1899 in the subform. Is it being treated as a
string?? How can I fix it?? I hope some angel can help, as I have spent 2
frustrating weeks on this. Thanks.