Results 1 to 12 of 12
  1. #1
    cp9 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5

    Computer rooms

    Hi guys, I'm new in database design so please forgive me for my mistakes. What I trying to create is database with computer rooms.


    Requirement are each room has specific amount of computers. Each computer has Pc name = room number and and pc number, serial number, model and manufacturer.

    I know is not complicated I just wonder if that how it should look like. Thanks

    Click image for larger version. 

Name:	vb-database-design.JPG 
Views:	31 
Size:	36.9 KB 
ID:	33842

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    To me, the second table is "Computers", since all the data in it relates to a computer, not a room.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    cp9 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5
    Hi, thanks for posting in my thread. How I can make sure that I don't exceed number of computers from Rooms in RoomsDetails("Computers") table. Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I'd probably use the before update event of the form you enter computers on. You can get the max with this method if you use a combo to select room:

    http://www.baldyweb.com/Autofill.htm

    and a DCount() to see how many computers already have that room:

    DLookup Usage Samples

    and cancel the update when the current computer would exceed capacity:

    http://www.baldyweb.com/BeforeUpdate.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  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,652
    By the way, you could also use the before update event of the combo to select room.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Further to Paul's advice, do you have a list of specifications/requirements?
    It is often easier for readers to comment on your database design if we know the facts of the "business" the database is intended to support.
    So a list of requirements, or a plain English description of the business would be useful.
    Sometimes it is easier for you -the developer- to describe a day or week in the life of our business.

    Good luck.

  7. #7
    cp9 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5
    Well I have to use this with visual basic, the problem is can't somehow picture how to make this database. Alexandra College has many computers rooms, each computer rooms has certain amount of computers. Sometimes computers are damaged or faulty etc. Staff members have to report any faults to the system. Computer rooms should include:

    The room names and the number of computers in each room, name = room number and computer number, model , serial, manufacturer.

  8. #8
    Join Date
    Apr 2017
    Posts
    1,792
    tblRooms: RoomID, RoomName, MaxComputers, ...;
    tblComputers: ComputerID, Manufacturer, Model, SerialNumber, Status, ... (where Status will have values for InUse/Broken/InRepair/Scrapped);
    tblComputerLocations: CLID, ComputerID, RoomID, AssignedDate, IsCurrent (where IsCurrent is true for records with Max AssignedDate for computer with AssignedDate < tomorrow's date at 00:00, and false for all others)

    You need a single parent form based on tblRooms with continous subform based on tbComputerLocations with form filter set to IsCurrent = True. Both forms are linked through RoomID. For subform, you have to restrict adding new records into subform, when the current number of registered computers equals with MaxComputers for this room (you can use parent form's OnCurrent event for this).

  9. #9
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    I'm not trying to be difficult; just trying to identify the scope of your project/application.

    Things to be considered ---are they relevant to your project. Think about situations and make sure you ignore or discard them from a point of knowledge--not because you didn't think of it.

    Could a computer be moved from 1 room to another?
    How about removing a wall and changing a room?
    How do you replace a faulty computer with another? Where would the other computer come from?

    Is this a school assignment?

  10. #10
    cp9 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5
    Hi Orange, please don't apologize you trying to help, I appreciate all help here. Thank you guys for your time and effort. Yes, it's a school assignment.
    There is another part where you could add or remove computers or rooms.

  11. #11
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    cp9,

    Too often people want to "use Access to build" their database. Do your analysis; understand the problem and the scope--what's included and what isn't.
    Here is a link to a thread from years back that discussed IT equipment in various locations.
    You may get some ideas -perhaps things not to do - from the dialog in the thread.

    Good luck with your project.

  12. #12
    cp9 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5
    Is not that I wanted to use Access database is a requirement to use this type of database in this assignment. I appreciate link to this thread, thanks.

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

Similar Threads

  1. What computer to buy
    By aussie92 in forum General Chat
    Replies: 27
    Last Post: 01-05-2018, 12:22 AM
  2. Importing Data from Home Computer to Work Computer
    By wam18jr in forum Import/Export Data
    Replies: 5
    Last Post: 11-06-2017, 06:59 PM
  3. Rooms and orders
    By Seldek in forum Forms
    Replies: 1
    Last Post: 12-08-2012, 09:38 PM
  4. Replies: 4
    Last Post: 11-29-2012, 12:45 AM
  5. Replies: 1
    Last Post: 05-25-2012, 10:36 AM

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