Table date stamp

LB79

Registered User.
Local time
Today, 18:31
Joined
Oct 26, 2007
Messages
505
Hello,
I have a table with a Yes/No field and a Date field.
The data in the table already exists and only the Yes/No and Date fields are empty (so that the user can check off whats been done).
I want to have the table so that when the Yes/No field is checked, it shows the current date, and when it is unchecked it shows null.

Does anyone know if this can be done in a table?
Thanks
 
impossible inside a table, only doable on a form using the "on change" event of the yes/no field
 
Hello,
I have a table with a Yes/No field and a Date field.
The data in the table already exists and only the Yes/No and Date fields are empty (so that the user can check off whats been done).
I want to have the table so that when the Yes/No field is checked, it shows the current date, and when it is unchecked it shows null.
Does anyone know if this can be done in a table?
Thanks

This is not something that can be done in a table, you could use a form to show the record and place an event behind the yes/no to add the date in the date field, so I suggest you create a form from the table, then select the tick box field in design view and add the code as follows:

In the On Change or Update Event

if me.checkbox name goes here.value=true then
me.date field name goes here.value=Date()
else
exit sub
end if

One point to note that with naming your fields be careful as Access has a list of reserved words which will cause issues, so naming fields as a suggestion something like this:

txtName for a textbox
chkCheckList for a checkbox
dtmDateRecorded for a datebox

I hope this helps you achieve your goal.
 
Well, I'm liking it (but of course I don't mind the Ribbon) and it is much better than 2007 in that they fixed several of the annoying things about 2007 (they also included a way to edit the existing Ribbons with a GUI instead of having to do everything yourself in XML).
 

Users who are viewing this thread

Back
Top Bottom