Your code only adds the date if there isn't a date already in
tbStableReturnDate. If you want to add the date regardless of anything in
the textbox, forget the If ... Then statement and just use:
Private Sub Form_BeforeUpdate (Cancel As Integer)
Me.tbStableReturnDate = Format(Date, "dd-mmm-yy")
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Bob" <(E-Mail Removed)> wrote in message news:eimuud$3o7$(E-Mail Removed)...
>
> "Richard Williams" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>
>> "Bob" <(E-Mail Removed)> wrote in message news:eimpj7$puh$(E-Mail Removed)...
>>> Arvin Its not holding the information when I quit and re open my db,
>>> funny enough it holds the date if I manually enter it in but the
>>> Description box with the code is not holding any information....Thanks
>>> bob
>>> "Bob" <(E-Mail Removed)> wrote in message news:eimn28$l39$(E-Mail Removed)...
>>>> Thanks Arvin I will give it a go.....Bob
>>>>
>>>> "Arvin Meyer [MVP]" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> I'd use it like this:
>>>>>
>>>>> If Len(Me.tbStableReturnDate & vbNullString) = 0 Then
>>>>> Me.tbStableReturnDate = Format(Date, "dd-mmm-yy")
>>>>> End If
>>>>>
>>>>> vbNullString will return 0 if tbStableReturnDate is either Null or
>>>>> Empty. Only use Now if you need the time as well as the date. The
>>>>> value property of a control is the default.
>>>>> --
>>>>> Arvin Meyer, MCP, MVP
>>>>> http://www.datastrat.com
>>>>> http://www.mvps.org/access
>>>>> http://www.accessmvp.com
>>>>>
>>>>
>>>
>>>
>> This is just a guess but the title of your post implies that you are
>> calling the code in the After Update event of the form. I think you need
>> to call it in the Before Update event.
> thanks Richard that worked, but if there is already a date in date box it
> will not over ride the earlier date.....Thanks bob
>