Database Question...Help!

Soldato
Joined
16 Mar 2005
Posts
2,889
Location
UK
Hi,
I'm currently writing a simple database, as my first step into the wonderful world of Microsoft Access. I know most other programs well but think I should learn more of databases.

I've all my tables sorted but am a little unsure of how to make calculations. For example I have an input form and want to be able to select a product and a quantity, but I'm unsure of where to put this data? Do I create a seperate table with the product details in?

And also once I have these in the database, how would I work out a total value when the quantity varies? So if I wanted 3xproduct A, how would it work this out as a value?

I hope that makes sense!

Thanks for any help i've been trying to work my way around this but I can't seem to do it.
 
I'm not entirely sure what you are asking but i think you're looking to implement a combo box onto the form, that contains the list of products,

To do this you will need to create a seperate table and save this table as "tbl_products". Within this table create one field called "Products" and in Datasheet view add in the information as required. After this open the original table that contains the products and quantity field in design view. Here select the product field and you will see at the bottom left 2 tabs, General and Lookup. Select the "Lookup" tab and choose the Display Control as "Combo Box", the Row Source Type as a "Table/Query" and the Row Source as "tbl_products"

Hope this helps
 
For working out the cost as the quantity varies, i would use a query. To do this i would base the query on the main table. However in this query include an extra field called "total cost: (cost*quantity)". For this you must use the field names as you used in the table originally. Also you must select the Total as "Expression" - this is on the 3rd row of the column in design view.
 
Excellent this does help. I'm just trying to sort out the relashionships between the tables at the moment which is very difficult! If there is anyone I could e-mail off the forums that would be willing to help me that would be excellent because I find this very difficult.

Thanks

s7yl3s
 
Back
Top Bottom