Results 1 to 12 of 12
  1. #1
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9

    Question Combo Box List display HELP!

    Hello all,

    I have an access 2010 conracts web db where i have a 'batch' field to group clients on a contacts table.

    I have a web form with a combo box of batches where upon a batch selection from the list all contacts belonging to that batch# will be displayed along with a few records like their contactname, company, email etc. The form should not display anything until a selection is made from the combo box if possible.

    So far I have been trying to get the combo box list to remove duplicate batch numbers but understand DISTINCT could work?

    Settings for the cmbBatch are:
    Control Source: Batch (from main table contacts)
    Row Source: Contacts
    Row Source Type: Table/Query


    Limit to List: Yes
    Inherit Value List: Yes
    After Update: GOT NOTHING HERE

    The settings for the form itself are:
    Record Source: Contacts
    On Current:
    On Load:

    If it helps this what the forms looks like now


    I am new to access and downloaded a few example dbs but didnt help much, so ANY help will be very much appreciated!!
    THANKS

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your RowSource for the ComboBox should be a Query that you create with the Query builder. Have you played with the Query Builder yet?

  3. #3
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    Thanks

    Yes I have very little experience with the query builder but have tried many times for 'row source' and 'after vavlidation' with no luck.

    If you have knowledge to walk me through what needs to be done to configure it for its designed functionality i would truly be thankful
    Quote Originally Posted by ehabo View Post

    I have a web form with a combo box of batches where upon a batch selection from the list all contacts belonging to that batch# will be displayed along with a few records like their contactname, company, email etc. The form should not display anything until a selection is made from the combo box if possible.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Create a query that returns what you want. A table returns all of the fields which are probably not needed for your ComboBox. Go to the RowSource of the cbo and press the "..." button on the RowSource property and it will ask if you want to create a query. Answer yes and then save the query as a starting point. Open the query and switch to SQL view nad post that here so we can see it.

  5. #5
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    Thanks for the helping hand


  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Please get to the query builder from your cbo RowSource property "..." button. This is not it. Then switch to the SQL view and copy and past that to a post.

  7. #7
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    When i try to switch to sql view i receive this warning




    Datasheet view then displays theses results and the only other view option i have is design view.


  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    This is just a table with two fields in it? Weird! It also looks like you might be using Lookup Fields: http://www.mvps.org/access/lookupfields.htm

  9. #9
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    Quote Originally Posted by ehabo View Post
    I have a web form with a combo box of batches where upon a batch selection from the list all contacts belonging to that batch# will be displayed along with a few records like their contactname, company, email etc. The form should not display anything until a selection is made from the combo box if possible.

    Settings for the cmbBatch are:
    After Update: need help with this code please!

    If it helps this what the forms looks like now
    Thanks i have managed to complete everything just cant figure out the afterupdate code to display my subform with batch members and a few details like name, email, phone etc. after the combo box selection.

    Any suggestions or help will go a long way!

  10. #10
    kahr3n is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    3
    I dont know if I got it right but i assume you just need to know where the afterupdate option can be found? Look into the image. If you are in Design/Layout view, you have to navigate on the Design tab then in Tools group, click Property Sheet.
    On the Property Sheet, head up to Event tab. And finally you will find the After Update...Click on (...)
    Last edited by kahr3n; 12-22-2010 at 06:20 AM. Reason: attachment

  11. #11
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    Quote Originally Posted by kahr3n View Post
    And finally you will find the After Update...Click on (...)
    Thanks, but i am actually just struggling with the afterupdate code. Any ideas on how i can get it to display only the records with a same batch number from the combo list?

  12. #12
    ehabo is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2010
    Posts
    9
    Works fine now, finally figured out the afterupdate macro. For those interested this is the code I used:


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

Similar Threads

  1. Replies: 13
    Last Post: 06-01-2010, 09:55 PM
  2. combo box value list
    By thewabit in forum Forms
    Replies: 13
    Last Post: 01-13-2010, 07:50 PM
  3. Replies: 0
    Last Post: 12-14-2009, 09:57 PM
  4. Replies: 2
    Last Post: 10-09-2009, 07:34 AM
  5. Combo Box Display
    By ssaucedo in forum Reports
    Replies: 17
    Last Post: 08-10-2009, 05:52 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