Query with calculation

J

John Mol

I currently have forms manipulated using infopath 2003 published on a
sharepoint site which interfaces with a database located on a sql 2000
server. Users enter data into a form view that shows all records for a
particular day. My problem is this. I need to be able to have one number, 70
which represents 70 hours have applied to it subtraction calculations from
hours inputed onto the screen by users, but only for that particular day. So
each day the total starts with 70 and as additional hours are entered, these
are subtracted from the total, the view however always remaining just the
current day being looked at and the resultant calculation result say 70 minus
10 displayed as 60.

Please help
 
S

Scott L. Heim [MSFT]

Hi John,

Since one View represents one day of records, you should be able to do the
following:

- Add an Expression Box to your form
- Click the Edit Formula button
- In the Formula box, enter: 70 -
- Click the Insert Function button
- Select "Sum" and click OK
- Double-click after the "sum" function as it shows
- Select the field from your form where the hours are entered
- Click OK until you are back to your form
- Test

Let me know if this works for you!

Best regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

John Mol

Scott,
Thankyou very much. This was exactly What I was trying to acheive. I was
going about it the hard way using SQL, additional fields etc. Had not thought
about a simple expression. Thank you very much for your help. It works well
:)

Kind regards,
John
 

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