English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am appending a query to a table called Hours. I want the field Est_Hours to be populated with the hours difference between StartDate and EndDate. I received helped on here about how to do that, and I was successful.

I am able to append the StartDate and EndDate, but when it comes to the Est_Hours, I get an error.

In the query, for Est_Hours, I have

Est_Hours:DateDiff("h",[StartDate],[EndDate])/3

When I don't append it to the Hours table, the calculation comes out correct, but when I try to append the Est_Hours field, I receive

Sytnax error(comma) in query expression 'Hours.[DateDiff("h",[StartDate],[EndDate])/3]'

Any help is much appreciated.

2007-01-25 05:49:19 · 2 answers · asked by ninapanama 3 in Computers & Internet Programming & Design

2 answers

The Est_Hours field ONLY exists in the QUERY. It does not exist in the TABLE. You can't create a new TABLE field by running a QUERY, and you can't do calculations in a TABLE FIELD.

However, if you want to view it in a FORM, you can still do that.

Create the FORM using the FORM WIZARD. in the FORM WIZARD's DATA SOURCE dialog box, select the QUERY with the calculated field. You will see all of the fields from the QUERY in the available fields listbox. Select all of them and move them to the fields on the form. You can then move them around. I would suggest that you open the form in DESIGN VIEW after you've completed the wizard, and find your calculated field, and set the LOCKED property to TRUE, and the TABSTOP property to FALSE, so you can't change the data in the calculated field.

2007-01-25 06:12:43 · answer #1 · answered by Richard H 7 · 0 0

No, yet i did attempt and particularly some circumstances to consume soup with a spoon, particularly if a soup is thick (you need to thicken the soup effectively by skill of which incorporate some flour). It takes time beyond regulation, so I take exhilaration in it longer

2016-11-27 01:28:27 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers