Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9

    My First Access Database

    Hi,

    I am new to access and want to create a relational database with the following attributes/functions:

    - Customer Database
    • store customer details (FirstName, LastName, Address, PhoneNumber etc.)
    • link customers to products purchased


    - Purchase Order Forms; records to be added and edited by new users via forms
    • search function to find existing customers records
    • add purchase detail to existing customer records


    - Create reports (mail merge labels) based on defined criteria such as location and purchase history
    - UI must be very user friendly for staff

    I am familiar with excel so I can create the tables without to much trouble. The forms however are causing me a lot of grief. The form wizard creates a form that searches my customer table record by record, but I have no idea how to make it add data to a purchase order table and create the relationship between customer and product.
    I have watched copious youtube videos on MS Access with limited success. If anyone can offer assistance or point me in the right direction I would really appreciate it.

    Thanks

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    ...I am familiar with excel so I can create the tables without to much trouble....
    IMHO familiarity with excel alone will not be enough to design your tables as they should be. Access is a different animal altogether. Many development problems stem from poor table structure and design. So, can you show us your tables and fields showing the primary and foreign keys.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    In case you're looking for confirmation, my first thought was the same as Bob's. Familiarity with Excel is almost a liability when it comes to properly designing tables in a relational database. One of many links on normalization:

    Fundamentals of Relational Database Design -- r937.com
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9
    Quote Originally Posted by pbaldy View Post
    In case you're looking for confirmation, my first thought was the same as Bob's. Familiarity with Excel is almost a liability when it comes to properly designing tables in a relational database. One of many links on normalization:

    Fundamentals of Relational Database Design -- r937.com
    Thanks guys, I just bought a book titled 'Access 2010 Bible' by Michael R. Groh. Can anyone recommend this book? Tables to follow.

    Thanks again,

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    I haven't read it, so can't offer an opinion.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9
    ok here is a break down my planned table structure;

    CustomerTable
    - CustomerID (primary key, auto number)
    - FirstName (text)
    - LastName (text)
    - Address (text)
    - City (text)
    - Province (text)
    - PostalCode (text)
    - PhoneNumber (text)
    - DOB (date/time)
    - Notes (memo)

    ProductTable
    - ProductID (primary key, auto number)
    - TourName (text)
    - Days (number)
    - DepartureDate (date/time)
    - SglPrice (currency)
    - DblPrice (currency)
    - TrplPrice (currency)

    SalesTable
    - SaleID (primary key, auto number)
    - CustomerID (foreign key)
    - ProductID (foreign key)
    - Purchase Date (date/time)

    My intention is to have customer data entered (and added to) when sales are made. I have created a many to many relationship between customers and products but have had very limited success developing forms. Any help is greatly appreciated. Please note that I'm a bit of a computer noob.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Unless a sale can only comprise one product, the normalized approach would be a "SalesDetails" table for the products. The SalesTable would not contain any product info. The details table would be related one-to-many to the sales table on the SaleID and to the products table on ProductID.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9
    typically sales will be one product (98% of the time) and not multiple products at once.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Unless it's 100%, you want the other table. I'd probably add the other table even if I thought it was 100%, since "things change".
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    I would also recommend against using structure like single price, double price, triple price. I would use 2 fields Qty, Price. Assuming that double and triple prices were included to give a discount create a function that applies the discount. For example:

    Single Price 20.00 each
    Double Price 18.00 each
    Triple Price 15.00 Each

    Code:
    Public function discount(ByRev price as currency, qty as long) as currency
    
    Select Case qty
          case is = 1
                discount = price
          Case is = 2
                discount = price * .9
          Case Is > 2
                discount = price * .75
          Case Else
                discount = 0
    end Select
    The case else is there just in case there's a 0 or less qty

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Ray makes a good point, and I'd go a step further and say it should all be in a table. I wouldn't have something like discount percentages in code, given their propensity to change over time.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9
    also discount will not be formula driven. It will be on a product by product basis. In this case it is tour packages so travelers who travel by themselves pay a premium as they are not sharing a room with a partner. I will submit a table with your suggested changes for sales details.

  13. #13
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    In that case you'll want a product discount look up table along the lines of

    productid number Foreign key to product table
    qty Number the level the discount is applied at
    discount Number can be a percentage or a fixed amount but it needs to be consistent throughout the table

    You will also need to add a qty field to the sales table.

    You would link the product id to the products table and the qty to the sales table. that will get your discount

  14. #14
    replicant00A52 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jun 2012
    Posts
    9
    Quote Originally Posted by RayMilhon View Post
    In that case you'll want a product discount look up table along the lines of

    productid number Foreign key to product table
    qty Number the level the discount is applied at
    discount Number can be a percentage or a fixed amount but it needs to be consistent throughout the table

    You will also need to add a qty field to the sales table.

    You would link the product id to the products table and the qty to the sales table. that will get your discount
    'add a qty field to the sales table. link the product id to the products table and the qty to the sales table.' are your instructions to link the qty to the sales table even though it is already in the sales table? I am confused.

    revised table structure;

    CustomerTable
    - CustomerID (primary key, auto number)
    - FirstName (text)
    - LastName (text)
    - Address (text)
    - City (text)
    - Province (text)
    - PostalCode (text)
    - PhoneNumber (text)
    - DOB (date/time)
    - Notes (memo)

    ProductTable
    - ProductID (primary key, auto number)
    - TourName (text)
    - Days (number)
    - DepartureDate (date/time)

    SalesTable
    - SaleID (primary key, auto number)
    - CustomerID (foreign key)
    - ProductID (foreign key)
    - Purchase Date (date/time)
    - TravelersQty (number) to reference pricing on ProductDiscountTable?

    ProductDiscount
    LookupTable
    -
    ProductDiscountID (primary key, auto number)
    - SaleID
    (foreign key)
    - ProductID
    (foreign key)
    - SglPrice (currency)
    - DblPrice (currency)
    - TrplPrice (currency)

  15. #15
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    You need to correct your table structure.

    the productDiscountlookuptable has too many fields it should only have 3

    Productid
    Qty
    DiscountRate

    Product Table should not have departure date that should be in the sales table
    Product Table should have a price field for the base price of each tour

    Sglprice, dblprice,trplprice should go away and never return.

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

Similar Threads

  1. Replies: 5
    Last Post: 05-16-2012, 12:48 AM
  2. Replies: 1
    Last Post: 11-25-2011, 11:16 AM
  3. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  4. Replies: 3
    Last Post: 05-15-2011, 10:52 PM
  5. Migration from Access 2003 database to Access 2007 database.
    By cyclus2 in forum Import/Export Data
    Replies: 1
    Last Post: 09-10-2010, 11:43 AM

Tags for this Thread

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