473,831 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Link criteria with different dates

1 New Member
This title probably doesn't describe my problem very well but it's the best I can come up with.

My fiscal year Starts a little before Jan1 each year, but it's an arbitrary start date, there's no definable logic to it. So I made a maintenance table to store the Start Date of the Fiscal Year, and the numerical value of that year. e.g.
12/27/2005 2006
12/23/2004 2005

In any given fiscal year each product I produce is supposed to meet a manufacturing standard, so I have another table that looks like:
ProductID; Year; StandardValue
1, 2006, 15000
1, 2005, 14000
2, 2006, 70
2, 2005, 85

So for each production run I am supposed to compare it to the current applicable standard to see how it matches up. On a record by record basis this is handy enough. Using a Select Max(Year) where StartDate > MyDate

My problem is I have a report that returns values over a 6 month period, so if my fiscal start date is inside the period (which it is 50% of the time), I have to compare that particular record to the previous years standard, because that's when it was manufactured. A simple example:
ProductID, DateofProductio n, Quantity
1, 12/26/2006, 14500
1, 12/30/2006, 15500

Using all of the above examples, what I want to get is:
ProductID, Year, Quantity, Standard
1, 2005, 14500, 14000
1, 2006, 15500, 15000

I hope this makes sense, logically it's easy enough to figure out, but I'm too dumb to make the leap in Access.

Any help would be greatly appreciated.
Sep 19 '06 #1
1 1719
PEB
1,418 Recognized Expert Top Contributor
Hi,

The first tip that it comes to my mind is to put Start and and date of your Financial Year...

It will be easier to create your query without complications!

:)

Have a nice day!
Sep 21 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5976
by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks a group of Sales people, the customers they deal with and the business they transact with them. I've got my head around all the tables & some of the basic Query structures OK and am beginning to delve into creating the forms I need to be able...
5
6535
by: Mal | last post by:
Hello. I have a database that tracks reservations at a campground. I want to be able to make a calendar type report that shows how many people are here in given period. Stored for each reservation are dteReservationFROM (The date they come in) dtrReservationTO (The date they leave)
1
2921
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access 2000. The access file is in access 2000 format. I have a form that will hold the relevent parameters for the query/report that reports the statistics for all job records that match a certain criteria. These are: - A Customer Name.
2
2542
by: Matthew | last post by:
Hey , I have built a query which takes values from unbounded fields on a form, and it all works except for one thing. I have a few fields in my query that are dates. I also have a start and end date and time on my form. So, a user will specify the start and end date, and also, the user has the option of checking which of the time fields from the query will have these dates as criteria. So, one of the date fields in my query is...
1
2531
by: max | last post by:
I have about 20 different querys but they all have some fields that use the same expression. I would like to add criteria to those fields without opening every query individually. Plus this criteria changes frequently. Is there a macro that I could write where I can enter the criteria once and the macro inserts it into all the different querys? I'm using Access 2000. Thanks Max
4
7204
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
0
2740
by: neoteny2 | last post by:
I need MS Access to automatically create reports/subreports based on specific criteria. I am building a database in Access 2003 with different locations/sites. I have the "sites" table created containing site info, including an empty field for "date". I also have a report format already created displaying the site info. I need Access to ask the user for a date, calculate three additional dates using the entered date (adding or subtracting...
2
5743
by: Mark Roughton | last post by:
I have a form where the users need to view records for various criteria, one of which is a date field on which they may wish to view all related data for the selected date, for all dates upto and icluding the selected date or all records on or after the selected date The user selects either "=", >=" or "<=" from a combo box and then a date from another combobox. The combination of thse two choices is then set in an unbound textbox so...
2
3941
by: cmartin1986 | last post by:
First of all I want to thank all of you that have helped me in the past this is an awesome fourm. My problem today is I have a database that builds charts that are viewed by a large group every friday morning. I am building six different charts that all have query criteria of between two dates right now I am going and updating the charts manually every week. The dates these charts work on is always friday to thursday every week. Is there...
1
5397
by: as323 | last post by:
Hi There, I am quite new to Access 2003 and am looking for someone to help me with a project im starting on. I currently have a query that is run which will pull up records on selected data and in the design view I put dates between two dates in the criteria. I want to create a form that will be the front end where a week beginning date and week ending date can be entered - and this will then be able to run the query with these dates in...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10777
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10493
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10206
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5617
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3960
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.