Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15

    I need help with certain records to show up in certain combo boxes


    Here is a copy of my database. I have no code yet.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    What do you mean by 'certain records to show up in certain combo boxes'? Maybe you want cascading (dependent) comboboxes. Review: http://www.datapigtechnologies.com/f...combobox2.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    I'm not sure June7, if you look at my db I have a form, in that form at the bottom I have certain text boxes labeled master electrician, construct. Electrician, journeyman electrician, etc... Next to that are the combo boxes that are linked to the employee table that has there name and title... I want records to come up under master electrician in that combo box for only master electrician and so on...

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    If you want only employees classified as electrician in the combobox list, then use a WHERE clause in the RowSource SQL.
    SELECT Employees.[Employee ID], Employees.[Employee Name] FROM Employees WHERE [Job Status] LIKE "*Electrician*";


    However, your database structure is not normalized. Multiple similar name fields for the same category of data is an indication of this. Are you sure you want to be limited to 22 material codes, 5 service trucks, 3 construction electricians, etc. ?

    This structure will give you a lot of issues in searching and sorting for material used, or electricians who worked, etc. Any sort of statistical analysis will be made more difficult and probably require a UNION query to manipulate the data to a normalized structure.

    Notice the Ditcher/Excavator combobox shows an error because of the / character in the field name. Advise not to use spaces and special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    Ok I understand that, so I add the where clause to every combo box to lookup certain job title. There is over 3000 material and material codes I deleted them to make db smaller

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Doesn't matter how many codes there are in Material table. The Tickets table is limited to 22 materials per record. Maybe 22 is more than enough, often it will be too many and many fields will be blank. This is not a normalized data structure. Maybe this suits your needs just fine but should be aware of the difficulties this can cause.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    How would I structure it to be more sufficient.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Would need related tables for each of the data categories. Tables for MaterialsUsed, PersonnelWorked, TrucksUsed, etc.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    Ok so I make those tables and I still need the tables I have currently... Material, vehicle, employee, etc.. Those tables I create how do I relate them... I'm just not understanding how to structure my db...need serious help.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    The existing tables (Material, Vehicle, Employee, etc) would be 'lookup' tables used as sources for selecting data for the Tickets table and related tables to document resources utilized for each ticket.

    This is basic relational database design concepts. Perhaps this will help http://www.rogersaccesslibrary.com/
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    Ok thanks I will take a look at it and get back to you with any questions if that's ok

  12. #12
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    Tessco Ticket - Copy.zipOk so I made those tables now, I should now relate them by whatever name in the column.. ex: Material table has material, material code so I relate them to the materialused table I created to material and material code, etc.???

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    You still do not appear to have a good understanding of relational database design. Did you get anything from the referenced link? I don't see how you could have had enough time to get through tutorials.

    Your new tables are for associating Ticket record with the resources utilized. Need fields in MaterialUsed for the TicketID and MaterialID (or MaterialCode - whichever you decide to save should be designated the primary key in Material table). Do not need Material field in MaterialUsed. Similar for EmployeeWorked and VehicleUsed.

    Now use form/subform arrangement for data entry. Main form bound to Tickets and subforms bound to the new tables. Use comboboxes in subforms to select resources from the 'lookup' tables. http://office.microsoft.com/en-us/ac...010098674.aspx
    Last edited by June7; 07-15-2014 at 01:10 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    garciaroizm is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    15
    June7,
    Can you look at this database and see if I'm on the right track and what I need to do next. Thanks for all the help.
    Attached Files Attached Files

  15. #15
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    You still have the multiple material, quantity, hours, operator fields in Tickets table. This is not a normalized data structure.

    Don't need separate fields for Complete and Incomplete. A ticket can be only one or the other. Use one field called Complete.

    The form is not what I described.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 01-23-2013, 10:44 AM
  2. Replies: 4
    Last Post: 10-06-2012, 11:57 AM
  3. Replies: 3
    Last Post: 07-13-2012, 06:33 AM
  4. Selecting records based on 2 combo boxes
    By comteck in forum Database Design
    Replies: 1
    Last Post: 07-10-2012, 06:05 PM
  5. Replies: 1
    Last Post: 07-30-2011, 03:21 PM

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