Results 1 to 2 of 2
  1. #1
    solly1966 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2016
    Location
    India
    Posts
    2

    Combo Box and it's relative text box for Edit the data


    Hi Access Masters! I have a master table that has (1) Primary_Key (2) Prod_Name (3) Prod_Rate. I want to give an option for the users to edit rates of the Products. I have set combo box for Prod_Name to select from the drop down for the users and it's working fine. While selecting a Prod_Name from the combo box the rate of the first record only is showing instead of the particular Prod_Rate of a Prod_Name. I want to display the appropriate rate in the text box I have created for editing. Thanks in advance.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    in the query driving your combo box, include the prod rate in the third column.

    so if your products table is this:
    Code:
    tblProduct
    Primary_Key  Prod_Name  Prod_Rate
    1            Product A  5.00
    2            Product B  10.00
    3            Product C  15.00
    the query driving your combo box would be

    SELECT Primary_Key, Prod_Name, Prod_Rate from tblProduct

    Then on your form (assuming it's a non continuous form) just put a text box next to your product combo box and put in the CONTROL SOURCE property: =cboProduct.columns(2)

    where CBOPRODUCT is the name of the combo box and 2 is the index of the field you want (Prod_Rate is index 2, combo boxes, list boxes and arrays start with an index value of 0)

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

Similar Threads

  1. Replies: 1
    Last Post: 02-06-2016, 05:33 AM
  2. Replies: 7
    Last Post: 02-08-2014, 12:31 PM
  3. Replies: 1
    Last Post: 09-30-2013, 11:47 AM
  4. Relative Data from a TABLE
    By hashjax in forum Access
    Replies: 1
    Last Post: 02-09-2011, 02:57 PM
  5. relink to relative path TXT data files
    By tobynegus in forum Programming
    Replies: 0
    Last Post: 08-19-2008, 10:10 AM

Tags for this Thread

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