Update query doesn’t update table

15 pts.
Tags:
Microsoft Access 2010
Microsoft Access tables
This is a really basic question, but I can't seem to make it work.
I have a simple table with 3 fields.
StartTime
EndTime
ElapsedTime
Each field is defined as a date/time datatype.
StartTime and EndTime are manually entered.
I'm trying to use the DateDiff() function in an update query to populate the ElapsedTime field with the number of seconds elapsed between StartTime and EndTime.
I put the ElapsedTime field on the query grid, convert the query to an update query and on the "Update To" row of the ElipsedTime column, I've entered: DateDiff("s", [StartTime], [EndTime])
When I run the query, I don't get any errors, but the ElapsedTime field in the table does not update.
Can you tell me what I am doing wrong?

Software/Hardware used:
MS access 2010

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Since DateDiff() doesn't return a date/time value result as I understand it, how are you assigning the result to your ElapsedTime column, which you say is defined as a date/time datatype. Are you simply trying to use the result directly? -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    As Tom said. Shouldn't elapsedTime be a numeric field????
    49,550 pointsBadges:
    report
  • carlosdl
    It would be easier to understand what the query is trying to do if you could post the SQL code.
    68,495 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following