Query with two date field for Date range

How do I create a Query using two tables that have dates field to
calculate a value using both the tables for a Date Range. For Example

I have four TABLES- Time Card(TC), PROJECT, TC hours(HOURS), and TC
expenses(EXPENSE). TC contains name of employees and their billing
rates. PROJECT contains Name of Project. HOURS field are TCId,
PROJECTId, Dateworked, and Hours. EXPENSE contains fields TCId,
PROJECTId, Dateexpense, Expense.
I want to build a query that over a Date Range that sums billable
amount=hours worked* billing rate+ expense.
 I set the Dateworked >=[forms]![Report Date Range]![BeginDate] And
<=[forms]![Report Date Range]![EndDate]

 What do I do with the Dateexpense to set the Date Range.

0
Rag742
10/5/2007 3:57:22 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
829 Views

Similar Articles

[PageSpeed] 12

On Oct 6, 6:18 am, Marco <Ma...@discussions.microsoft.com> wrote:
> Hi.
>
> If I uderstand you want to make a criteria at the same time for two
> different tables, is that it?
>
> If so, create a inner join query.
>
> I hope it helps,
> Marco
>
> "Rag742" wrote:
> > How do I create a Query using two tables that have dates field to
> > calculate a value using both the tables for a Date Range. For Example
>
> > I have four TABLES- Time Card(TC), PROJECT, TC hours(HOURS), and TC
> > expenses(EXPENSE). TC contains name of employees and their billing
> > rates. PROJECT contains Name of Project. HOURS field are TCId,
> > PROJECTId, Dateworked, and Hours. EXPENSE contains fields TCId,
> > PROJECTId, Dateexpense, Expense.
> > I want to build a query that over a Date Range that sums billable
> > amount=hours worked* billing rate+ expense.
> >  I set the Dateworked >=[forms]![Report Date Range]![BeginDate] And
> > <=[forms]![Report Date Range]![EndDate]
>
> >  What do I do with the Dateexpense to set the Date Range.

Thanks But this creates another problem. If there is no value for a
date in expense  or hour field for the dates in Range the formula of
total bill is blank. How do i get around this

0
Rag742
10/8/2007 10:46:11 PM
Reply:

Similar Artilces:

Timer for Queries?
Does anyone know of a macro or add-on that I could use as a simple timer for queries? I don't like to use the CPU time in the Task Manager because of it's inaccuracy when not receiving full CPU usage. THanks for any suggestions -- cmungs Exactly what are you trying to accomplish? Are you trying to cause a query to run automatically every so often? If so, you will need to use the timer event on a form to do that. -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com "cmungs" <cmungs@discussions.microsoft.com> wrote in message news:88EC7019-045F-4EF...

How to Calculate the Date and The Number
Guys, Please help me on how to do the below calculations. Date (YYDDMM) 080131 = it goes like this 8+1+3+1 = 13 is the answer Text 1000888 = it goes like this 1+8+8+8= 25 is the answer Thanks This function will do what you seek: Private Function GetSumOfDigits(varData As Variant) As Long Dim lngPos As Long, lngSum As Long lngSum = 0 If IsNull(varData) = False Then For lngPos = 1 To Len(varData) lngSum = lngSum + Val(Mid(varData, lngPos, 1)) Next lngPos End If GetSumOfDigits = lngSum End Function -- Ken Snell <M...

Erratic results from query criteria
I am getting different results from running the same query with the same selections. One moment it is all behaving as expected, the next it has gone haywire. (I have done what appears to me to be EXACTLY what I have done in another database, where it works perfectly every single time.) In a query I have, amongst others, the following fields: Category SubCategory Company I want to be able to select any OR ALL of the relevant fields. I have the following criteria: Like "*"&[Type Category otherwise leave blank for ALL]&"*" Like "*"&a...

Update Query ?
Is there a way to 1) Assign events when adding in data thru an update query for example if you append a bunch of data into a table could you then do some kind of an update query to say if there is an initial event and no others tag this one Renewal 1 etc.. the only real data you have to go on would be Customer A and the total amt .. the event, renewal event and the delta would all need to be added in example: Say Customer A comes in with an initial deal then Customer A renews their deal So, the data would look like when you're done.: Year Custo...

Updating Data from two different worksheets
I have two worksheets, General Ledger and Out Ledger. The general ledge lists our inventory according to a LOT ID and the total number of item in that lot; i.e. column A: Lot ID, column B: Total Number of Pieces column C: Balance The Out Ledger lists the number of items sold from a particular lot i.e. column A: Lot ID, column B: Number Sold I want to be able to calculate the Balance in the General Ledger give the Number Sold in the Out Ledger. I am having difficulty in makin sure the Lot ID's match up and that the proper cells are referenced. Any suggestions/advice would be greatly appr...

Two questions
Hey everyone, I have two questions: 1. I have created a patient manager database that tracks appointments, billing, and medications. I have 4 subforms within a main form. I want to be able to create one main record with subrecords for appointments, billing, and medication associated to it. Can this be done? 2. Everytime I am in the database, other users can't save their records. How do I change this and still limit user access? Thank you in advance. -- bhsvixon On Thu, 11 Feb 2010 11:59:02 -0800, 1encapdiva <tgrandberry@encapomaha.org> wrote: >Hey ever...

Sort by Hebrew Date
Does anyone know if (and how) Excel's sort by date function can be used to sort by Hebrew date rather than English Date? Excel can handle the year, but the months and days do not map directly. If you format the dates as integers in the form yyyymmdd, always using 2 digits for the month and day, the standard numerical sort might work. -- Gary's Student "Desperate Dan" wrote: > Does anyone know if (and how) Excel's sort by date function can be used to > sort by Hebrew date rather than English Date? > ...

field highlight
i have an account spreadsheet. with a column heading reading status. How can i tell excel to highlight all cells containing status "I" fo inactive in red, and status "A" for active in green -- Message posted from http://www.ExcelForum.com You would use Format>Conditional Formatting for this. Select the column in question(I'll assume A). Format>Conditional Formatting>Formula is: enter =A1="I" Format>Pattern Red>OK Add =A1="A" Format>Pattern Green>OK Note: you can use up to three conditional formats(four if you count...

design query match anywhere?
In the design query I want to match the letters "ABC" anywhere in the column 'description'. I could not get instr to work by using: InStr(description, "ABC")) > 0 How else can I match ABC (upper and lowercase) to anywhere in my 'description' column? Thanks! Are you saying you put that InStr bit as a criteria under your Description field in the query designer? Try putting Like "*ABC*" as the criteria instead. Alternatively, you could add a computed field to the query InStr([Description, "ABC") and then put >0 as the ...

Two different organizers in one meting
imagine the folowing: Person A is the assistant of Person B, who has given delegation on his calender. When person A makes a meeting request in the calendar of person B and has made a reservation of a resource (meeting room), everything seems to be working fine. however, when person A opens the meeting request in the calendar folder of Person B, I can see that the organizer of the meeting is Person B. When I open the meeting in the calendar of the resource mailbox, the organizer of the meeting is Person A ?? This occurs with Outlook 2007 SP2 and Exchange 2010. Is there a way t...

automatic date
Is there anyway that a specific date shall be entered automatically for example the computer shall search in the excel table if there is already a date as the 10 of the current month if not it shall input the date in a date field a cell each 10 th of the month after it past or on it ...

Unexpected Error- Running Advance Find Query
I am getting a message that says "Unexpected Error An Error has occurred" when I am running an advanced find query on two custom entities. It seems to be when I have certain custom fields included in my view that the query errors out. Any help on this would be greatly appreciated. Thanks so much. Just wanted to add that I seem to get errors when there is a 0.00 amount in these fields... "TJ" wrote: > I am getting a message that says "Unexpected Error An Error has occurred" > when I am running an advanced find query on two custom entities. It se...

Removing a field From a Pivot Table
I'm working with a pvt table in excel. Right now there are several fields in the pvt table, including the month different entries are made and the account that made them. When i hit the show detail button in the pivot table i get the detail all of the entries grouped by month and by account on a separate sheet. I want to continue to do this, but i want to also be able to get a second view where i hit the show detail button and only see the detail grouped my account (month is either hidden or totally removed from this list of data in the pvt table and the rows that composed the different...

pass through query
If a combobox is populated by a pass-through query, does it requery every time the form is closed and reopened? Thanks, Sam Yes. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Sam wrote: > If a combobox is populated by a pass-through query, does it requery every > time the form is closed and reopened? > Thanks, > Sam ...

Show two value ranges on one axis
How do you show two value ranges of the same data on one axis? (the axis range is separated by a zigzag/heartbeat style line). e.g. instead of showing 0-50, the axis could show 10-25 and 40-45. Any help appreciated! Take a look at Jon Peltier's Broken Y axis example. http://www.peltiertech.com/Excel/Charts/BrokenYAxis.html "NOKIA" <NOKIA@discussions.microsoft.com> wrote in message news:2564B7F7-0693-4A7E-A5C8-9D3180B4EA6B@microsoft.com... > How do you show two value ranges of the same data on one axis? (the axis > range is separated by a zigzag/heartbeat style l...

a count field in a query?
Hello, I have a query in which I would like to create a field which increments by 1 for each record selected, so if there are 10 records selected by the query, this column would show numbers 1 to 10. Ideally I would like to have some text in front of each number, say invoice1, invoice2 etc. From a previous posting I realise that this is frowned upon but it would be the simplest solution for my problem! How can I do this? Thanks Geoff On Mon, 03 Dec 2007 08:54:00 +0000, Geoff Cox <<>> wrote: >Hello, > >I have a query in which I would like to create a field which >...

why does Word display my field codes upon opening?
I am using Office 2007, and version 11 of Reference Manager. When I open my document, both the Reference Manager fields and the page numbers display with the cryptic words in [brakets]. I must Select All and 'toggle field codes' every time. Can I have Word open with the fields already 'toggled'? Office Button>Word Options>Advanced then uncheck the "Show field codes instead of their values" in the Show document content section of the Word Options dialog. -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unle...

Saving Username and Pass with Web Queries
I am pulling data from a website that requires you to provide a usernam and password everytime you visit the site. Excel has cachin capabilities, but everytime you close excel and try and open up th spreadsheet again, it can't login. What is the fix for this? Thanks, Hend -- Message posted from http://www.ExcelForum.com Bump! --- Message posted from http://www.ExcelForum.com/ ...

Birthday query for many children in one record
I have a database for the church, it has one main flat table only. Each record for the parents have field for child1 name, child1birthday, child2 name, child2birthday, child3 name, child3birthday - up to 5 children. I am having difficulty trying to get a report to list the birthdays of the children like this parent name, child 1 name, child 1 birthday month etc. so you get something like this:- Parent John Smith, child Mary Smith January 3 Parent Fred Jones, child Bert Jones March 4 Parent John Smith, child Jane Smith March 6 Parent Harry Brown, child Jane Brown March 6 Parent Bert Taylor,...

Unresponsive Query Wizard
Hi there, I have an Excel 2003 user who is using a spreadsheet that pulls data from our SQL server. When he opens it and refreshes the data it is fine, it pulls the current data, but when he tries to edit the query, the Query Wizard does not appear, he can see it on the task bar, but when he switches focus using task manager everything is greyed out and nothing works. I have tested the file from my computer and it is fine, which suggests a problem with his machine or installation. Does anyone have any ideas? Cheers, Steve Dooza wrote: > Hi there, > I have an Excel 2003 user who...

Adjust the print range of a list
I import data (names etc) using a macro. The macro makes a kind o signature-list, layout with borderlines etc. Sometimes the data contains 10 names and sometimes 200 names. If the list only contains 10 names and I want to print, the first pag contains de 10 names the rest of the pages are filled with only th layout (created for the max. of 200 names) Is it possible that the area of printing is set automaticall containing the last name when the next cell in the column is empty ? The names are in the first column. Thnx PJ -- Message posted from http://www.ExcelForum.com Hi try a macro li...

Another simple query
Dear all, I have a table that contains first names and last names in different fields. Is there any way to write a query that will give as a result the first name and last name in the same field? I hope this makes sense. Thanks in advance! SELECT [last_name_field] & ", " & [first_name_field] AS whole_name FROM [your_name_table] Change the field and table names to whatever your actual fields and tables are. Cheers, Jason Lepack On Apr 23, 9:47 am, Homer <peter.a.r...@googlemail.com> wrote: > Dear all, > > I have a table that contains first names an...

Query query
I am trying to create a new field in which it shows the sum total of 10 fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest way to do this? -- Joe NewFieldName: [Charge Time] + [Charge Time 2] + [Charge Time 3] .... etc -- Good Luck BS"D "joet5402" wrote: > I am trying to create a new field in which it shows the sum total of 10 > fields (Charge Time, Charge Time 2, Charge Time 3, etc.); what is the easiest > way to do this? > -- > Joe I tried this, and it doesn't work. Is there something I'm forgetting? -- Joe ...

Earliest Date via LookUp?
is it possible to select the earliest date from a list via vlookup?What should my formula look like? Many Thanks for your assistanc -- Message posted from http://www.ExcelForum.com I guess you would have to sort the table with your variable and date ascending first and then use the vlookup function. ie =VLOOKUP("A",A:B,2,0). I would be tempted to automate the sort (possibly everytime you enter the formulae sheet). =MIN(DateRange) "Bush Kangaroo >" <<Bush.Kangaroo.15ivfe@excelforum-nospam.com> wrote in message news:Bush.Kangaroo.15ivfe@excelforum-nospam....

summing part of cells in a range
hi all, in the range myRange each cell contains 10 digits, how to sum the first 4 digits to the left of each cell in this myRange, instead of adding each cell alone like: =left(A1,4)+left(A2,4)+left(A3,4)+... thanks for any help Hi =SUMPRODUCT(--LEFT(A1:A10,4)) -- Regards Frank Kabel Frankfurt, Germany "excelFan" <excelFan@discussions.microsoft.com> schrieb im Newsbeitrag news:4B2EAEDB-F3DD-4A73-BD88-EDBB3BA0E992@microsoft.com... > hi all, > in the range myRange each cell contains 10 digits, how to sum the first 4 > digits to the left of each cell in this myRa...