Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query calculation in underlying table

Status
Not open for further replies.

03SCBeast

Programmer
Jan 26, 2005
36
US
Help,

"tblMYTABLE fields" [Person], [to], [from], [#days]

"qryMTTABLE fields" [Person], [to], [from],#days: DateDiff("d",[FROM],[TO])

I have qryMYTABLE based on tblMYTABLE. My main reason for doing a query is I needed to calculate the # of days a person was assigned to project and I don't know of a way to do that within a table. Query works fine but doesn't transfer #days to [#days] in underlying table.

Thanks
 
It's best not to keep calcluations in a table. You're better off keeping them in a query, and calculating it when you need it.

-------------------------
Just call me Captain Awesome.
 
A starting point:
UPDATE tblMYTABLE SET [#days] = DateDiff("d",[FROM],[TO])


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Grande...Oddly enough, your post is making me reconsider if I actually need to have them in a table.

PHV...where would this code be placed btw?

Thanks to both of you for your response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top