Results 1 to 5 of 5
  1. #1
    nawaray is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Feb 2009
    Posts
    3

    Combo box change

    Hello,

    I have a combo box with different values(named description, cmddesc). When selecting one of these values I want some other controls, other combo boxes to have predifened values based on this selection. the other combo box is named price cmdprice.


    i have table 3 which has the descriptions, and table 4 which has the prices
    Actually i dont know how to write the code for this,
    any help please?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,923

  3. #3
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,663
    You set up a query for the row source for the combo box. Then in the other combo box, you set up a query for the row source and have the criteria look at the first combo box. In the click event of the first combo box, requery the other combo box.

    The point I'm trying to make is that we cannot read your mind and cannot see your mdb. You have to provide details..... hopefully meaningful table,field, control and query names, not something like Table4 or Text6. Take the time to give proper names to objects, being aware of reserved words. For example "Name" or "Date" are bad choices because they are not very descriptive ("Name" of what, "Date" of what) and because "Date" is also a built-in Access function.

    In six months or a year, if you have to modify the mdb, you will have a bad headache from banging your head against the table because you can't figure out what you were trying to do. Trust me: been there, done that, got the bumps on my head to prove it.
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

  4. #4
    nawaray is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Feb 2009
    Posts
    3
    thankx RuralGuy and ssanfu

    ssanfu, can you give me an example on the coding,?
    for table 3 i have these fields (id_desc and description)
    for table 4 i have these fields (id_price and price )

    my form has 2 combo boxes:
    description(cmddesc) and price(cmdprice)

    what i want is when the user clicks on the description automatically the price will appear for that description , i dont want the user to choose the price.
    (for example if the users chooses the description school automatically the price $100 will appear)

    thankx in advance

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,663

    ssanfu, can you give me an example on the coding,?
    for table 3 i have these fields (id_desc and description)
    for table 4 i have these fields (id_price and price )

    How are Table3 and Table 4 related??
    HTH
    -----
    Steve
    --------------------------------
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

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

Similar Threads

  1. change textbox value after combo update
    By arctushar@yahoo.com in forum Forms
    Replies: 5
    Last Post: 09-06-2010, 07:17 PM
  2. Image change based on combo box
    By bosve73 in forum Forms
    Replies: 4
    Last Post: 08-09-2010, 02:23 AM
  3. Change to selection in combo box
    By corystemp in forum Access
    Replies: 7
    Last Post: 06-28-2010, 10:20 AM
  4. Using VB to change the value in a combo box
    By Noobie in forum Programming
    Replies: 7
    Last Post: 03-18-2010, 10:07 AM
  5. Change existing combo box to new one
    By snifferpro in forum Forms
    Replies: 3
    Last Post: 08-10-2009, 09:26 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