Need to retain Several Start & Stop Timestamps under one Record

A

Arisrune

Hello,
I need to track several start and stop times for a single record. I
currently have two tables set up, one for user data and incidentals & a
Datefieldstart/Datefieldstop table both linked by Autonumber to eachother. I
modified two control buttons to fill =now() on_Click into either
Datefieldstart/stop and this works fine. The issue I have is that it
constantly updates the same cells to a current date upon clicking the control
buttons. I want to be able to retain the original dates and have the new
data enter on a seperate row each time.

Also expanding on the control buttons: is it possible to have only one
button that will fill in Datefieldstart cell w/first click and the
DatefieldStop w/second click? Much like the way a stopwatch would work.
 
A

Al Campagna

Arisune,
If I understand correctly... and I'm not sure I do...
Your code to update your date field should probably be sent to a new
record before it updates the field with Now().

Private Sub cmdTodaysDate_Click()
DoCmd.GoToRecord, ,acNewRec
DoCmd.GoToControl "YourDateFieldName"
YourDateFieldName = Now()
End Sub
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
A

Al Campagna

Also...
A better solution might be...
Name the button that updates the date field
cmdTodays&Date
Doing this means that instead of clicking the button with the mouse, just
hit Alt-D on the keyboard, and the code will run just as if you had
physically clicked the button.
Now... place your cursor in whatever control wants a Now(), and hit
Alt-D.
That way you always know what field gets the Now().
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
A

Arisrune

Thank you Al Campagna for your response and suggestions. However I still
have a problem linking several start-stop timestamps to a single Record. I
suspect the flaw is in linking both project record & timestamp by autonumber
values. It seemed like an obvious choice since all of my user records and
project records are identified and linked by autonumber. (Based on Microsoft
Issue Tracker template). Is there a way to link one unique record to a set
of it's own continuously populating timestamps?

The reason for this request is that we have several projects active at a
time and they aren't always completed uninterrupted or in one day. Instead
of tracking start day to finish day as I originally had it, it was deemed
necessary to track the actual times we start and stop work on it. This is
the unfortunate necessity of working at a Help Desk.

I’m also trying to keep the interface simple for my coworkers who have very
little knowledge of access; so multiple steps would need to be automated on
event triggers or macros.
 
A

Al Campagna

Arisrune,
I'm using sample object names... substitute your own object names...

Sounds like you don't have a ONE to MANY realtionship between something
like a tblIncidents and tblIncidentActions.
If you did, a Main form containing the IncidentID and all the Incident
information from tblIncidents could be related by a unique IncidentID... to
a continuous subform, on that form, that contains all the Fix/Diagnose
actions taken.

Incidents are the ONE side of the One to Many relationship, and
tblIncidentActions represents the MANY side.

tblIncidents.
INCID INCDate Description Client Name ...etc
1234 1/1/07 Won't Boot Bob Smith
|
|
V tblIncidentActions
INCID ActionID ActionDate ActionTaken
1234 7142 1/1/07 Some fix
1234 7231 1/5/07 Ran Tests
1234 8123 1/12/07 Reseat Cable
-
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 
J

John W. Vinson

I
suspect the flaw is in linking both project record & timestamp by autonumber
values.

Yes, that's a flaw. You can link an Autonumber (in the "one" side table,
Incidents here) to a Long Integer number field (in the "many" side Actions
table) - but emphatically *NOT* to another Autonumber.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top