Results 1 to 12 of 12
  1. #1
    JonahThrane is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2023
    Posts
    4

    Question Several attributes in one category

    Hello, my name is Jonah, and I am attempting to make a database of teaching materials.
    We have some material that can be used in more than one class, and I would like to make it so you can search for the class and find the material needed, these are physical items, i have pictures in the database, and i have their location listed with what room they are in, then which cupboard and then which shelf. The search function is made and works, its a simple Me.Filter code in VBA.



    To start I have made a Tabel with some basic information about the item, including the class numbers it applies to, which is linked to a table including the class numbers and names to make it easier in the forms.
    What I would like to be able to do is add more classes per item. Eg: if the teaching material is applicable in classes 1.1 and 11.2.1 I would like to be able to list it as such rather than having to make two or more of the same item in my table but for different classes.

    I hope I have explained myself somewhat well enough. I would be happy to include the file but it wouldnt include the images for the database and it was too big for the 500kb limit.

    Thank you for any help and tips you can give me.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    You would use a junction table between Materials and Classes.

    Woould still have one record per Class per Material.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    JonahThrane is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2023
    Posts
    4
    Quote Originally Posted by Welshgasman View Post

    Woould still have one record per Class per Material.
    And thats what I am trying to avoid

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by JonahThrane View Post
    And thats what I am trying to avoid
    I do not know any other way of doing it?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I wonder if the advice given has been correctly interpreted. Jonah, if you have not reviewed db normalization I suggest you do so first. The idea that you should not repeat information just so you can show additional but different aspects about it is correct. Junction tables is one way to take care of that problem.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Material-->MaterialForClass<--Class

    This is a common table structure to deal with a Many to Many relationship.
    WelshGasman and Micron have suggested this also.

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    I agree the many to many approach is the only viable way. However I have to ask - do you never have the situation where materials are stored in more than one place? for example perhaps pencils and pads are in every classroom or perhaps in cupboards in several corridors

    I would be happy to include the file but it wouldnt include the images for the database and it was too big for the 500kb limit.
    It is generally not advised to store pictures actually in the database, store them in a folder and in your database store the path - which might only need to be the file name if the pictures are all stored in one folder.

  8. #8
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi Jonah
    Can you upload what you have so far?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  9. #9
    JonahThrane is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2023
    Posts
    4
    Quote Originally Posted by CJ_London View Post
    I agree the many to many approach is the only viable way. However I have to ask - do you never have the situation where materials are stored in more than one place? for example perhaps pencils and pads are in every classroom or perhaps in cupboards in several corridors

    It is generally not advised to store pictures actually in the database, store them in a folder and in your database store the path - which might only need to be the file name if the pictures are all stored in one folder.
    Pencils are not teaching materials. "Teaching materials" are materials used in relation to teaching about a subject, spare parts and similar count here, not pencils.

    And thats what i have done so far, I have pictures in folders and linked them in by typing the file name.

  10. #10
    JonahThrane is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2023
    Posts
    4
    I will see what i can do, if i do it would have to be an external link i upload, because its too big for this platform apparently.

  11. #11
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Quote Originally Posted by JonahThrane View Post
    I will see what i can do, if i do it would have to be an external link i upload, because its too big for this platform apparently.
    You can upload a subset, as it is the structure that is the most important.
    Even an empty DB or nearly empty would help.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  12. #12
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    also before loading, compact repair and then zip the file

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-22-2016, 04:36 AM
  2. Replies: 5
    Last Post: 05-10-2014, 09:24 AM
  3. Derived attributes
    By mlbwhf in forum Access
    Replies: 8
    Last Post: 11-06-2012, 09:07 PM
  4. attributes out of order
    By Dornenhexe in forum Queries
    Replies: 9
    Last Post: 07-12-2010, 02:36 PM
  5. Hidden Attributes
    By NMJones in forum Access
    Replies: 1
    Last Post: 02-09-2010, 10:57 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