473,756 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How much did a collection of items cost at some date in the past?

How much did a collection of items cost at some date in the past?

If anyone could help me with this, I would be most appreciative.
I am learning VBA in Excel, but haven’t yet learned VBA for Access.

I have a recipe database.
Database tracks recipes, ingredients and the cost of ingredients.

Number of ounces of ingredients per recipe remains constant.

Cost per ounce of ingredients may change over time.

Question:
how to determine the cost of ingredients for a recipe for a given date
in the past.

tIngredients holds current ingredients and their current cost per
ounce.

tHistoryOfIngre dientCosts is a separate, unlinked table, holding at
least one record showing the name of the ingredient (IngredientName ),
the starting cost of the ingredient (CostPerOz) as well as the date
the ingredient was first used (Start_dt).

If an ingredient changes cost, a new record is appended to
tHistoryOfIngre dientCosts, showing the IngredientName, the new
CostPerOz and the Start_dt at which the new cost was applied.

tHistoryOfIngre dientCosts is sorted, first by IngredientName and then
by Start_dt.

User wants to enter a date to determine the costs for each recipe on
that date.
(I am not sure how database should capture this date)

I think I should be able to use tHistoryOfIngre dientsCost to determine
the cost of ingredients on that date.

I hope to create a report which uses the date supplied by the user to
determine the cost per ounce for each ingredient on that date.

From cost per ounce on the date in the past, I would be able to
calculate cost of recipes on that date in the past.

Thank you in advance for any light you can shed on this problem.

Aug 16 '08 #1
0 1461

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6443
by: Maria | last post by:
How can I display the items in a collection in a listbox? Then, what is the code to remove an item from the collection when the item is selected in the listbox ? Thanks for all help!! Maria
18
5751
by: Scott | last post by:
I have a collection where the items in the collection are dates. I want to iterate over the collection and build a value list string for the rowsource of a listbox. The dates in the collection are not in chronological order. Is there a way to first sort the collection and put the dates in chronological order before creating the value list string? Or, how would I iterate over the collection pulling out the dates in chronological order? ...
2
3182
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of the source code in a compressed file that you are free to download...
8
1896
by: tshad | last post by:
I have a string that I read from my database: 1|8|5620|541 These are all values in my ListBox. I want to select each of these items (4 of them - but could be many more). At the moment I am doing the following: Dim a() As String Dim j As Integer a = JobCategoriesSelected.Split("|") ' Where JobCategoriesSelected is set to 1|8|5620|541 For j = 0 To a.GetUpperBound(0)
3
2153
by: Matt Michael | last post by:
I have a listview control and a collection object right now that I'm trying to pass information to and from. Whenever I click on the checkbox, I want it to remove certain listview items and add them to the collection. Whenever I uncheck the checkbox, I want to add the items back into the listview from the collection, and remove them from the collection so I can do the process multiple times. The listview tag is being used as a key, so I...
6
7217
by: Arthur Dent | last post by:
How do you sort a generic collection derived from System.Collections.ObjectModel.Collection? Thanks in advance, - Arthur Dent
7
1692
by: Mick Walker | last post by:
I have a collection of objects populated from a SQL Server (sorted descending). Each of these object has a date field. I need a way to loop through these object starting from the newest entry, and finishing at the last, and output them in the format: June 2007 Item Item Item
0
1421
by: Steve K. | last post by:
I understand the concepts and rules for invoking UI methods from a non-UI thread. In the past I have always checked with the control's InvokeRequired property and Invoked my delegate accordingly. This has worked fine, nothing special. BUT, I am now working on my first client/server app and I have a slightly new challenge that I'm not finding a good solution for. My client passes an EventShim with a callback to the server. When...
158
7862
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is discouraged due to some specific reason. If someone can give inputs on the same, it will be of great help. Regards, Pushpa
0
9287
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
10046
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...
1
9857
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9722
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...
1
7259
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6542
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();...
1
3817
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
3369
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.