stock control project

illusion

Registered User.
Local time
Today, 13:09
Joined
Mar 25, 2004
Messages
16
hello,
i have 2 problems,

1 how the stock control will work? I found similar posts saying to calculate the items sold and compare them with items in stock. When there is restocking the items in stock field will be increased?

2 i want to store the total amount paid from a customer in each order. I searched the posts for this case and the answer always says you shouldn't store calculated values but calculate them each time. In my case the prices for a product might change and user wants to know the total amount received from a customer for different purposes i.e discount, promotion e.t.c
 
This topic is covered here frequently. Data that is time sensitive is fine to store in two places. The standard technique is to include the price field in the RowSource for the combo you use to choose the product. In the AfterUpdate event of the combo, you would copy the price from the combo to a bound field on the form.

Me.Price = Me.cboProduct.Column(2)

The columns of the combo's rowSource are a 0 based array, so the price field in my example is actually the third field - the first field is reverenced as (0), the second as (1), etc. So, use whatever number is appropriate in your situation.
 
hello,
i missed a link (http://allenbrowne.com/AppInventory.html) in a post, this is very helpful but i have a problem,
instead of the list box you said i am using text boxes.
I have
TblProducts(ProductId,UntiPrice....)
TblProduntsOrdered(ProductId,OrderId,Qty,UnitPrice)

how i will assign the TblProducts.UntiPrice to the TblProduntsOrdered.UnitPrice ?

thanks
 

Attachments

I fixed a lot of problems:
1. Your relationship window was cluttered with extraneous relationships. I deleted them. To delete an unwanted relationship, delete the relationship - THEN delete the table if you need to. Just deleting a table, hides a relationship but doesn't delete it.
2. You were using Date as a data name. Never use VBA function or property names as the names for your objects. This causes confusion in VBA and is ultimately more of a problem than embedded spaces or special characters.
3. I removed all the caption properties. Once you start working with queries, the caption does nothing but cause trouble.
4. I set the compact on close option since the db was quite bloated.
5. I removed extraneous tables from the subform's query.
6. I changed the unitprice field in the subform's query to select from the products ordered table rather than the product table. You want to see the saved value rather than the original/current value. I left this field unlocked which would allow it to be manually changed. If your business rules prohibit this, change the locked property to yes so that the user can't accidentally change the price.
7. I added one line of code in the AfterUpdate event of the combo to copy the unit price from the product table to the unit price of the products ordered table.
 

Attachments

Thanks a lot!!

Most of the things you changed i don't know how to because i am new to access.... :rolleyes:
 
Wicked

That's a smart little database there Pat - is there anyway of creating an excel project that works in the same way?
 

Users who are viewing this thread

Back
Top Bottom