enter an autodate in proper field after a yes/no checkbox (1 Viewer)

mervt

New member
Local time
Today, 18:59
Joined
Dec 11, 2016
Messages
6
Is there somewhere in access where I can put in code or something to enter the date of that day (in DateActive) field when the active field is checked and enter the date in DateReleased field when the box is unchecked? see below.
To better explain. I have a user table and an Active Field. When we create a new user we Activate them (yes/no) checkbox. If we Activate him by a checkmark I would like the date of that day to be entered in the next field automatically (DateActive)
When the user is left us we wish to Deactivate them.... still leaving the initial date in the (DateActivate) field but now entering todays date in (DateReleased) field.
I am working with Access 2013
Field names
[Active]----- [DateActive]---- [ DateReleased]
yes.no checkbox----- Date field--------- Date field

You may have to explain in detail. I am a newby....
Thanks for help
merv
 
Last edited:

bob fitz

AWF VIP
Local time
Today, 22:59
Joined
May 23, 2011
Messages
4,717
Why bother with the checkbox field if you can determine the status from the presence of dates in the other fields
 

mervt

New member
Local time
Today, 18:59
Joined
Dec 11, 2016
Messages
6
perhaps I don't read you right but here is what I would like.
I will create a new user, enter name, address, phone# and then activate them by a checkbox. At this point I don't have a date entered. If the the activate date was entered automatic if the active field was checked, that would save actuially entering that date. when the user leaves, we would simply uncheck them and the date they left (or deactivated) would be entered in the next field.

Later I wish to enter those dates in another table automatically to gain access to certain equipment....but that is next step.
 

bob fitz

AWF VIP
Local time
Today, 22:59
Joined
May 23, 2011
Messages
4,717
You would be changing the data by using a form which would have controls (textboxes) bound to the date fields of the table bound to the form. You may want to use a checkbox or some other control on the form but it does not need to be bound to a field in the bound table
 

mervt

New member
Local time
Today, 18:59
Joined
Dec 11, 2016
Messages
6
OK. I guess I am trying to do all this from the database Table itself. You are saying I should use a Form with controls?
thanks so far...
 

mervt

New member
Local time
Today, 18:59
Joined
Dec 11, 2016
Messages
6
If this is the case, I wouldn't need the field Active in my table. The DateActive field would be populated and the DateReleased field would be empty or visaversa. I could then create further reports from that.
Is this a better way?
thanks
merv
 

bob fitz

AWF VIP
Local time
Today, 22:59
Joined
May 23, 2011
Messages
4,717
I would do it something like the file attached
 

Attachments

  • Database6.zip
    26.6 KB · Views: 329

bob fitz

AWF VIP
Local time
Today, 22:59
Joined
May 23, 2011
Messages
4,717
OK. I guess I am trying to do all this from the database Table itself. You are saying I should use a Form with controls?
thanks so far...
Definitely. Tables are for storing data.
 

mervt

New member
Local time
Today, 18:59
Joined
Dec 11, 2016
Messages
6
Well. Thanks a bunch. You have been a great help.
 

Users who are viewing this thread

Top Bottom