473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.

tHistoryOfIngredientCosts 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
tHistoryOfIngredientCosts, showing the IngredientName, the new
CostPerOz and the Start_dt at which the new cost was applied.

tHistoryOfIngredientCosts 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 tHistoryOfIngredientsCost 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 1433

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

Similar topics

4
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
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...
2
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...
8
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...
3
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...
6
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
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,...
0
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. ...
158
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...

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.