This is a discussion on "VB Code to Calculate Query Results" within the Databases section. This forum, and the thread "VB Code to Calculate Query Results are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
VB Code to Calculate Query Results
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
VB Code to Calculate Query Results
I have a client billing database. If I'm on a Client Project form, I want to click on the New Invoice button and have the total amount of time entered for that project (within a given period) appear in a message box.
My guess is that a query will have to run that filters the Time table based on the Project ID and Start and End dates. How do you sum all of the hours in the resulting query? The following details my thought process: >Click on New Invoice, a form/message box appears that displays the current Project ID and prompts for for Start and End Dates. >A query runs that filters the Time table based on the Project ID, Start and End dates. >The sum of the resulting records is stored in a variable. [NEED HELP WITH THIS STEP] >The variable is passed to a message box that says "do you want to bill Client for X hours?" >The X variable is passed to the Subtotal field on the Invoice form. I am an intermediate VBA user but I have no idea how to calculate the results of a query. Any assistance is greatly appreciated! Thank you! |
|
|
|
|||
|
Re: VB Code to Calculate Query Results
How are you planning to get hours from a start and end date? Are you billing a flat X hours per day?
|
![]() |
| Tags |
| code, calculate, query, results |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Displaying Query Results Aesthtically | chubs | Starting Out | 1 | May 5th, 2008 13:39 |
| MySQL query query | dangergeek | Databases | 3 | Apr 12th, 2007 12:45 |
| check query results values | kal | PHP Forum | 4 | Apr 11th, 2007 15:30 |
| Calculate item quantity plus shipping | SteveJP | JavaScript Forum | 15 | Oct 3rd, 2006 21:33 |
| if else bug and calculate interest funtion help me plz | bazzano | JavaScript Forum | 1 | Sep 26th, 2005 07:31 |