Field Equals Todays Date When Button Clicked

on-2

Registered User.
Local time
Today, 03:22
Joined
Nov 24, 2002
Messages
34
Hi

I have a form which contains a button to print a report. I would like to be able to have a field filled with todays date when the button is cliked to record when that report was printed. I would like it only to record a date once though so if it was cliked 3 days later it would not overwrite the first date.
So I thought a code of

If Forms![form1]![dateprinted]= null then
Forms![form1]![dateprinted]= date()
Else
End If
Then the print bit.......

i cannot seem to get this to work, i can make it do it if the field has a value but to only insert the date if the field is empty?.

Can anybody help please?
 
on,

Code:
If IsNull(Forms![form1]![dateprinted]) Then
   Forms![form1]![dateprinted] = Date
End If

Then the print bit ...

Wayne
 
Thank You, worked just right
 

Users who are viewing this thread

Back
Top Bottom