Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77

    Trying to create a simple Order Form

    Hi all , Hope someone can help.

    im trying to put together a small simple database for my local bakers.

    I've made 3 tables

    Customers , Products and Orders

    My problem is i cant seem to generate an order form to input orders using data from customer table and data from the products table

    In an ideal world i would like a drop down box to select the customer, then be able to input orders at the bottom of the form by way of a datasheet subform using drop down combo box for products, im getting close but cant seem to get the prices of order lines to auto generate.
    im sure my relations are all correct.
    very hard to explain everything without doing a wall of text, is there a tutorial that i could follow that is based on customers orders and forms that anyone can recommend ?

    my setup

    CustomerTable
    ---------------
    PK CustomerID
    company
    contact
    address
    postcode and so on

    Products Table
    --------------
    PK ProductsID
    product
    price
    catergory

    Order Table
    ------------
    PK OrderID


    CustomerID FK
    ProductID FK
    Quantity
    Price
    Total

    should i have another table for order entry so it could be a subform....please help

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    There is a data model here that also shows Orders and OrderDetails. It has additional info that may not be within your " business scope", and you can ignore parts as you wish.
    http://www.eclipse.org/birt/phoenix/...lsDBSchema.pdf

  3. #3
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    cheers , I will take a look

  4. #4
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    assuming that all works well , would i be best to use a form or a query to input orders into my database

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  6. #6
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    and would this form take the shape of customer form with OrderDetails subform as a pose to Orders Subform ?

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Customer Order and Order Details

    If you are interested, in the videos below, the instructor goes through a Customer, Order, OrderDetails, Products example.

    You might wish to watch these free videos. There are other videos, these are just a sample.

    http://www.youtube.com/watch?v=IiVq8M5DBkk Logical data modeling

    http://www.youtube.com/watch?v=BGMwuOtRfqU Candidate key

    http://www.youtube.com/watch?v=ZiB-BKCzS_I Normalization

    http://www.youtube.com/watch?v=pJ47btpjAhA Normalization example

    http://www.youtube.com/watch?v=q3Wg2fZENK0 1st Normal form

    http://www.youtube.com/watch?v=vji0pfliHZI 2nd Normal form

    http://www.youtube.com/watch?v=HH-QR7t-kMo 3rd Normal form

    http://www.youtube.com/watch?v=q1GaaGHHAqM E_R Diagramming

    http://www.youtube.com/watch?v=lXAGQ8vmhCY ERD Part 2
    You can go back and watch these as often as you want.
    Last edited by orange; 02-23-2012 at 11:42 AM.

  8. #8
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    ok its going better thanks to a few templates and videos, can anyone tell me the formula for taking Quantity x Price to give me an end of line subtotal, i have tried

    =[Quantity]*[Price]

    in the Default value box on the property sheet for the Subtotal column, hmm some things not right,

    UPDATE ,,,, Managed to sort the total price thingy but now need formula for getting the price of a product which is in the current orderSubForm
    Last edited by leeli67; 02-23-2012 at 09:59 AM.

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Wouldn't the Price of a Product be stored in the Product Table?

    You could store the price in a lineItem table as well, since in the lineItem table the price will be the price when the Order was made. Whereas the Price in the Product table is the current Price -- and the Price will likely change with time.

  10. #10
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    heres my tables and relationsAttachment 6432Trouble is I cant seem to create a good subform for my order form, i thought that the idea was to for instance select a customer from a drop down combo box in the top of my order form then go down to my subform data sheet style and from a combobox select a product and have the ProductID , Price fields auto populate , suffice to say i am struggling.

    I create my order form by using wizard and using OderTable for main and OrderDetails for sub(datasheet style)

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    I've taken a quick look but I think:
    You don't need ProductName and Total in OrderDetails
    You don't need CustomerName in Orders
    You don't need CustomerId or OrderDetailsId in INvoices

  12. #12
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    Thank you, I will delete those fields and see if i can get further

    but wont this mean that i will have to remember all the ID for my products when entering orders into a form, I have 300 or so products so that might not work.

  13. #13
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Hold on, I said I don't think you need them.
    Gather up some test data and see what you need to answer queries you would expect to have in your "operations".
    Don't delete anything just because I said maybe...

    Make a backup of your database. Have a naming/numbering scheme so you can go back if you have to.

    Can you save and post a copy of your database in Acc2003 format (mdb)?

  14. #14
    leeli67 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Location
    London UK
    Posts
    77
    Thats ok im not going to delete my Customers and product stuff , idont have alot of data anyway


    Attachment 6433

  15. #15
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    No. That's not the point. When you are building a database, it is good practice to do it in stages or versions. Whenever there is a significant change, in structure or in data (or forms/queriw..) you should backup your database into a known folder and record what exactly it represents.
    eg. version 2.1 Jan 25/2012 -changes in tables(a,b,c) bla bla bla. If you ever have a major screw up, you can go back to a "version that you have backed up", instead of starting from scratch.
    There are some backup routines that you can access from a form or procedure to do a backup with date and time parameters.

    You might look for backup procedure for MS ACCESS on google. As I recall Helen Feddema has written a routine.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Sequential Order ID on Form
    By charya in forum Forms
    Replies: 1
    Last Post: 01-15-2011, 10:51 AM
  2. Can't create a simple macro......
    By Sarge, USMC in forum Access
    Replies: 1
    Last Post: 01-05-2011, 11:48 AM
  3. a simple purchase order details
    By damie in forum Database Design
    Replies: 16
    Last Post: 12-30-2010, 04:14 AM
  4. Replies: 1
    Last Post: 11-07-2010, 11:04 AM
  5. Very simple task - create many-to-one realtion
    By ganjan in forum Database Design
    Replies: 3
    Last Post: 06-03-2009, 01:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums