Results 1 to 12 of 12
  1. #1
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22

    Cascading Combo Box help

    I'm entirely new to Access, but trying to learn as quickly as possible to help my mother's business as much as I can.


    So I'll explain what I'm trying to do and what I need help with. I've created 3 combo boxes. The first combo box selects which type of Product (Window or Door), the 2nd selects the Type of Product, and the 3rd selects the Series of the selected type. Lastly, I'd like for three sets of information (Found on the Series table) to be transferred to an Excel spreadsheet after all 3 combo boxes have been defined.


    Here are my problems:


    -The first combo box properly list the ProductName, but the 2nd and 3rd combo boxes list their #ID when I would like them to show the actual name of the choices.
    -I have no idea how to go about having the Info columns in the Series table be recorded on another table to an Excel spreadsheet. (Do I even need an Excel sheet? I really just need to be able to export a spreadsheet to a .csv file for the program Bartender to recognize it and print a barcode label)




    Here is my file (Couldn't upload): http://www.mediafire.com/download/uz...ComboBox.accdb

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    1. Review http://www.datapigtechnologies.com/f...combobox3.html

    2. build a query that joins the related tables, export query to csv, don't need Excel middleman
    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
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    Thanks, I was able to figure it out. Now I have a few more questions

    1. How do I make my 2nd combo box be disabled until I select a value in the first, and the same for my 3rd when I haven't selected 2nd?

    2. When I try to select a value in my last combo box, I'm getting the popup "Enter Parameter Value". What could this be related to?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    1. Set the Visible or Enabled property of combobox to No. Then code in first combobox AfterUpdate event to change the property setting. However, if this is in a continuous or datasheet view form, won't work nice. Because property setting affects all records.

    2. Access can't find referenced field name. Double check spelling.
    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
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    I'd like to ask one more question while I'm attempting to figure out the create an AfterUpdate event to enable control of the disabled box

    1. This template I found avoids having to do what that video explains (or so I think) by assigning a name to the actual values. How do I do something like this: http://i.imgur.com/Ez2TkJJ.png ? In the template, the FamilyID column's data type is set to Number, but a drop down menu is available depicting the Name corresponding to the actual ID#.

    I'll let you know if I'm unable to figure out the two previous questions you answered. I really do appreciate the help, it's allowing me to learn the program much better.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You describe a multi-column combobox and is demonstrated in the earlier referenced link. I can't view the png right now.
    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
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    I'll try to describe it better, as I'm not sure it is a multi-column combobox. What I'm describing is in the Datasheet view is in all of the tables excluding the first.

    On Table2 the field that references Table1ID is a list of number values that correspond to the ID of each row in Table1. In the template I found, instead of listing the actual number value a drop down menu is available to select the name that is assigned to the values table Table1.

    Are you able to view a direct upload of the pic?
    Click image for larger version. 

Name:	dropdown.PNG 
Views:	14 
Size:	7.2 KB 
ID:	16894

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, I see that. Now what is the SQL statement of the combobox RowSource? Advise not to set lookups in table, especially if it involves alias, review: http://access.mvps.org/access/lookupfields.htm
    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
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    Thank you so much so far for the help. I have one last task to accomplish as I can't seem to figure it out myself about the query which gathers the columns of information.

    1. How exactly do I do this? Once my final combo box is selected how do I make a query which outputs the referenced columns of data? I already have a separate table which stores all the specific information I want to be outputted and each has a reference value which corresponds to an item in the final combo box (if this is even required).

    2. Is there any way for this query to be stored in its own table/ other method of storage? If I were to select 3 different values 3 different times from the cascading combo boxes, is there a way for 3 rows of data to be stored (potentially more) to be exported in mass to a .csv?

    The application of this database is essentially to create a list of details pertaining to a specific product to eventually be printed onto a barcode label by the program Bartender.

    Edit: By the way, answering my questions alone have really helped my understanding of the program and it's given me the drive to do more with my knowledge.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    1. I am not sure what you are asking for. Perhaps a dynamic parameterized query is what you need. Review http://www.datapigtechnologies.com/f...earchform.html

    2. Sort of. Could use VBA code to write the records of each search to a 'temp' table and then export that. Then purge the table for the next export process. There are also code methods to write lines to a text file (not using the export wizard). This requires opening the text file as an object in VBA.

    Something else to consider - I haven't done myself but I think Access report can be designed to print barcode. Think it requires installing some special fonts.
    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
    kspabo is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    22
    I'll try to explain this better. Say the combo box I select is a value of different doctors names. When I select whichever name, I'd like a query that outputs the doctor's 1)phone number 2)address and 3)room#. This output would then need to be exported to a .csv file. This is the first thing I'm trying to accomplish. The second thing is I want the query to be able to store the information of multiple doctors to be exported to a .csv (so I don't have to manually export a .csv for every doctor I select).

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I have provided one method for selecting a single doctor and filtering a query or report with that selection. Other methods require more code.

    If you want to select multiple doctors, what would be the criteria to base that selection on?
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 02-27-2014, 03:43 PM
  2. Cascading combo box
    By Plix in forum Access
    Replies: 1
    Last Post: 02-20-2013, 06:54 AM
  3. Cascading Combo Box Help
    By euphoricdrop in forum Forms
    Replies: 3
    Last Post: 04-12-2011, 05:35 PM
  4. cascading combo
    By rexb in forum Forms
    Replies: 9
    Last Post: 10-26-2009, 04:10 PM
  5. Cascading Combo Box
    By nywi6100 in forum Forms
    Replies: 0
    Last Post: 10-23-2006, 01:45 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