Results 1 to 8 of 8

Thread: Forms

  1. #1
    Join Date
    Oct 2006
    Posts
    17

    Unanswered: Forms

    Hi there guys. I manage to resolve my previous problem. I am creating a database system for my project. And have run in to a problem.

    Im doing a take - away, i therefore require a form to process the orders, however, when adding the "form order" in to my main, i am unable to select multiple dish and only can select one.

    Please view attached.

    I have tried doing this my combo box, list box and sub-form.
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ...so what is your table design
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Oct 2006
    Posts
    17
    my table design is shown below.
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I think your current design is inadequate to support the user requirement
    I think you need to (re)learn some basics about relational theory... try this page for a good grounding in groundingin the topic.

    each table should contain data only relevant to that data store.

    so to think on your application
    in the real world an order comprises various elements
    a date, a time, a customer, the item(s) they buy, the amount they pay, the method of payment. however in data storage terms thast breaks down into various components

    a customer may place an order for one item, or for many items in one order, a customer may place more than one order (eg over several days, or they may like the food so much they lap the table more than once).

    you need a mechanism to associate more than one product (item sold) per order.

    in table design terms we are looking at (probably the following tables
    a customer table (cotnaining anything pertinanet to that customer eg name address, telephone number, email... you nmae it)
    a product table storing details of any and everything they sell inclduing price, size (weight / volume)
    an order table which contains the header information (date/time of transaction, amout paid, method of payment, it also refers [ie stores the customer number] to the customer table)
    an order items table referring to the the order table and product tables detailing what items this customer has ordered (including quantity)

    each table must have a unique index (primary key)
    for each table there is usually a clear an simple key to use... a system generated autonumber value. In this isntance there may not be for the order items table (you could decide to use an autonumber column, or use the OrderID & an Item ID.... that would ensure that each item number was unique for any one order.

    having designed your tables then establish some realtionships (tools | realtionships) so that the rules are enforced in your table design. then design your forms.

    You may want to extend the table design to identify what type or foodstuff is being sold (is it an starter, accompianment, main course, dessert...if so the type of food becomes a table.

    incidentally when designing tables Id strongy reccomend that you do not use spaces in the column names. How you name them is your choice, but you are building probblems for yourself using spaces. Many people here would advocate usign capitalisation eg Telephone No becomes TelephoneNo, others may use Telephone_No. To conserve space in queries some (most Id guess) would use abbreivations to TelNo, or Tel_No. If you decide to use abbreviations then the style of abbreviations is up to you, but you must make certain that the abbreviation is consistent, and doesn't cause confusion. The column names should clearly identify the data they are stroing. In some circumstances it can help to proviude an indication of the data type. for example if Im using a numeric autogenerated column I tend use ID as the suffix, if its alphanumeric II'd use type.

    HTH
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Oct 2006
    Posts
    17
    thanks for your help

  6. #6
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82

    Cool here's one i made earlier

    i have created a similar application for customer invoicing

    three tables, (i could have used four, with the fourth one being [customer file]) to keep it simple

    table 1 [invoice]
    table 2 [invoice items] (child to [invoice])
    table 3 [menu items] (in my app it was [stock file])

    if you create table 2 with a lookup column for table3 [menu items] you can select it in a suib form and the set the required [qty], [retail price] etc in table 2 [invoice items] as required.

  7. #7
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82

    Cool here's one i made earlier

    not sure why i can't attach the file??????

  8. #8
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82
    here it is, i think you might find the dlookup function useful
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •