Order forms

rollerz

New member
Local time
Today, 13:13
Joined
Dec 9, 2002
Messages
6

:confused:
I am creating a database involving a shop for my AS ICT project, one of the things i need to create is an order form. I am trying to create it so when the product ID is entered on the form the price of it comes up automatically and it adds up all the product prices to give a sub total at the bottom. Can anyone help me?
:)
 
You can use a DLookup to get the price to show on the form.

I'm unclear as to where the previous figures come from to add up....... is it a sort of "shopping basket" of goods purchased so far or something?


Col
:cool:
 
I've got a similar kinda thing.....

Do you have any additional details to an order...apart from just the products being sold??

E.g i have a order form holding customer information, within this there is a subform 'order_Details'...this has a drop down list of products.

I total them at the bottom with a simple text box formulae.
 
What i have is a form where i make orders, this information is hopefully linked to an order table where the information from the order is sent, the form has order ID, customer ID and date at the top, then further down it has 2 columns of boxes, the first is product id and the second is price, these are both hopefully linked to a products table, then at the bottom there is subtotal, delivery price and total, so far the only thing that works is the order ID and thats only because it's an autonumber... (shows how much of an amateur i am :rolleyes: ) i think the customer ID works, the actual order stuff however doesn't, i'm trying to make it so when the product ID is entered it looks up the table and finds the price automatically and puts it on the box next to it in the price column. Then in the subtotal box it adds up all the prices in the prices column, then in the total box it gives me the subtotal plus delivery price. Can anyone help me, its driving me insane!! :(
®
 
Hi rollerz....have been trying to send you a database all morning..but i've got limits on file attactchments all over the show...so i'll try and help first!!
(am novice myself...but have been where you are a few months ago!)
* n.b Firstly your form should be linked to your orders table!!! as you needed to get the fields from somewhere!!


Firstly the form must be produced only after you have created rational and relevant tables

Tables:
Customer : (Customer ID, Company Name, Customer Address etc…..
Products: (Product ID, Product Name, Price, Description etc….
Orders: (Order ID, Customer ID, Order Date, Distribution Date etc….
Order Details (Detail Id, OrderID, ProductID, Price, Quantity etc (this will be your subform.) within your orders table

Primary Keys can be autonumbers unless you need them logically something else

What you need to do is create your tables logically and relevantly as above (ii take it you understand the functionality of primary and foreign keys??....(be honest if you don’t!)

When you create these tables you can do so in design view….selecting the relevant data types and validations for you (if you leave the validations etc. as default we can address them later)

When you have made your tables look at the ‘relationship window’ and create the relevant joins (simply lets you see exactly what your doing.)
When I say joins you can join the customer ID in the customer table to the Customer ID in the Orders table (enforce referential integrity ..this is a checkbox option when you create a join)

When you have a foreign key (the primary key from another table)in your tables, this is used to allow you to bring data through from that table…e.g just product ID can bring the product name and price in etc..

I use this code….
Say I wanted the product ID in the Order Details to allow the user to see the product name ..i’d do the following….

I’d go to my field Product ID (in design view of order details)…Press the lookup tab (at the bottom of the screen)
Choose display control..Combo Box (row/sourcetype table/query)
For row source you can use/modify this code

SELECT DISTINCTROW [ProductID],[ProductName] FROM Products ORDER BY [ProductName];
This will bring this up….

Do this for all foreign keys
e.g to show customer name in orders...
(this will also create a drop down list for users to choose from)
SELECT DISTINCTROW [CustomerID],[CompanyName] FROM [Customers] ORDER BY [CompanyName];

Etc…
Get back to me….we’ll do this stage by stage.

Unles anyone else on the board has a better solution

Sarah
...:D

Let me know if anything doesn't make sense. I know i'm not great at explaining stuff!!
;)
 
:confused: I've entered in the SELECT DISTINCTROW [ProductID etc... code in, what is it meant to do, it gave me an error message when i mispelled the code but now it is correctly spelled it just gives me an empty combo box, have i made a mistake somewhere? Also, i have 5 Item ID, Price, Quantity columns so customers could order more than one item at a time, am i going to have to reduce it to one and just use the same customer ID with each different product?
Rollerz
:)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom