📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Help with a database

I have to do a database project for college and I have a question about Drop down boxes e.g for title I've set it so I can pick from mr mrs ms miss etc. My database is for a jewellery shop and I was wondering if it is possible if I can have different drop down boxes for a certain field depending on another field I.e if ring is selected as the jewellery type I would like the size drop down box to display a,b,c etc but if bracelet was selected as the jewellery type I would like the size drop down box to show small, medium, large etc. Is this possible and how would I do it?

Comments

  • rsykes2000
    rsykes2000 Posts: 2,494
    Part of the Furniture 1,000 Posts Combo Breaker
    Forumite
    If you use an Excel spreadsheet, you can set up a pivot table - an example is found at http://www.homeandlearn.co.uk/ME/mes9p4.html
  • BritRael
    BritRael Posts: 1,158 Forumite
    Firstly, what software are you intending to use? If MS, Access is a great database program. If you want a simple layout, then Excel (which is a spreadsheet program) could be used. I forget how to do it in Access (try hitting F1 and it'll tell you) but I remember in Excel click Data/Validation/Settings and from the drop down box, select list (a 'source' box will pop up).
    Before you do that though, go a few cells to the right of where you want the 'database' data to be and enter your list in separate cells (one on top of the other). You can then click the red arrow in the source box and simply select your list, and click ok. Once you've done this select the cell, and drag it down (by selecting the cross in the bottom right of the cell) as far as you like which will copy this list format to all the cells in the column.
    This will only give you a simple list though, you cannot make a 'list within a list' using this method. But of course you could make a column called 'type' containing ring, bracelet, necklace etc. and another called 'size' etc with a list in each. :)
    Marching On Together

    I've upped my standards...so up yours! :)
  • I am using MS Access 2007 I'll look at the help menu.
  • Look at the 'afterupdate' event of the first box.
    In this event you can set the rowsource() of the 2nd box to whatever you want. You may want to set the value of the 2nd box to null if you change the first box.
    Debts: Virgin Card [STRIKE]£5,600[/STRIKE] £5,636, First Direct [STRIKE]£7,700[/STRIKE] £7,000, Halifax [STRIKE]£3,200[/STRIKE] £3,810, Halifax Clarity [STRIKE]£755[/STRIKE] £711, Tesco [STRIKE]£4,005[/STRIKE] £4,450, MNBA [STRIKE]£6,700[/STRIKE] £6,580, Loan [STRIKE]£15,834[/STRIKE] £15,218 Total: [STRIKE](45K at highest) £43,794k[/STRIKE] £43,405
  • HO87
    HO87 Posts: 4,296 Forumite
    You can use a number of methods of supplying data into a drop-down box (known in Access as a Combo Box). If all you are going to do is use a number of simple fixed data types - like Mr, Mrs, Countries for example then you could write these into a separate table and have the data brought through into your main table by going to the Lookup tab (in Table design view) selecting "Combo Box" and then selecting your Rowsource (the name of your subsidiary table).
    My very sincere apologies for those hoping to request off-board assistance but I am now so inundated with requests that in order to do justice to those "already in the system" I am no longer accepting PM's and am unlikely to do so for the foreseeable future (August 2016). :(

    For those seeking more detailed advice and guidance regarding small claims cases arising from private parking issues I recommend that you visit the Private Parking forum on PePiPoo.com
  • I wonder what the op did?
    Debts: Virgin Card [STRIKE]£5,600[/STRIKE] £5,636, First Direct [STRIKE]£7,700[/STRIKE] £7,000, Halifax [STRIKE]£3,200[/STRIKE] £3,810, Halifax Clarity [STRIKE]£755[/STRIKE] £711, Tesco [STRIKE]£4,005[/STRIKE] £4,450, MNBA [STRIKE]£6,700[/STRIKE] £6,580, Loan [STRIKE]£15,834[/STRIKE] £15,218 Total: [STRIKE](45K at highest) £43,794k[/STRIKE] £43,405
This discussion has been closed.
★ ★ ★ Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 355.8K Banking & Borrowing
  • 254.9K Reduce Debt & Boost Income
  • 456.2K Spending & Discounts
  • 248.4K Work, Benefits & Business
  • 606K Mortgages, Homes & Bills
  • 179K Life & Family
  • 263.8K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.2K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.