It is possible that it is the code. Since MyDateField could be null,
you would need to check for that or use the NZ function to force a date
if it were null. I think that the following expression will take care
of this.
Me.AllowEdits = (Nz(MydateField,Date())=Date())
Alternative code, that you could use in place of the above
IF IsNull(MyDateField) Then
Me.AllowEdits = True
ELSE
Me.AllowEdits = (myDateField = Date)
END IF
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
Sorry, not done yet or atleast not so fast:
I now get this error:
Invalid use of Null (Error 94)
Null is a Variant subtype used to indicate that a data item contains no
valid data. This error has the following cause and solution:
You are trying to obtain the value of a Variant variable or an
expression
that is Null. For example:
MyVar = Null
For Count = 1 To MyVar
. . .
Next Count
?is this from adding the code suggested in the
forms-properties-event-on
current [event procedures] ...
OR
from a calculation im doing in a different box as in
=IIf(IsNull([No Sale %]),[Customer Count]/[No Sale Count],0)
Thanks in advance
Jevon
:
John
Thank You so much
that worked AND I COULD UNDERSTAND!
Thanks
Jevon