VB Code to Calculate Query Results

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 10th, 2006, 11:57
New Member
Join Date: Apr 2005
Location: Los Angeles, CA
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 20th, 2006, 22:20
Reputable Member
Join Date: Mar 2005
Location: Margaritaville (a state of mind somewhere between Inebriation and San Diego), CA
Posts: 245
Thanks: 6
Thanked 0 Times in 0 Posts
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
code, calculate, query, results

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 15:44.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42