Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    bladelock9 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Location
    NY
    Posts
    10

    Combo Box

    I want to display all the current fields on my Form.Joe from a Combo Box. Example:
    My combo box "Product" is taken for a table which contain 3 fields: FLD1, FLD2, FLD3. so, if you click on the combo box you see the first record. Now, being that these records are very long, I want the user to be able to see in on the Form, becuase they cause see it on the combo box! So, I want to take the Combo FLD1 and store the data and make a text box to display the test in it and do the same for the other two fields. So, as the users click on the combo box the wording would also display on the form in three different text boxes. How do I store that information in the Combo Box to be displayed on the current Form in three separate text boxes. I hope that is clear

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Does this help?

    BaldyWeb - Autofill
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    Hi BladeLock9,

    I hope you won't mind me barging in here.

    Paul,
    I tried what you suggested on your site and I was only able to get it to Partly work.

    I created a combo box that gets values from a small 4-field table:
    [ID (AutoNumber), Preference [Text], Weight [Number], Description [Text]]

    The combo box displays the 'Preference' field from the table.

    The row source for my combo box is:
    Code:
    SELECT [ID_Preference_Weight].[ID], 
    [ID_Preference_Weight].[Preference], 
    [ID_Preference_Weight].[Weight], 
    [ID_Preference_Weight].[Description] 
    FROM ID_Preference_Weight 
    ORDER BY [ID] DESC;
    I can get the two text boxes I have on my form to display either the ID - or the Preference or the Weight - using:
    =[Combo8].[Column](0)
    =[Combo8].[Column](1)
    =[Combo8].[Column](2)

    I just cannot get it to display the Description [Text] using this:
    =[Combo8].[Column](3)

    Any idea what I might be doing wrong?

    I hope I am not 'hijacking' this thread by asking this question.

  4. #4
    bladelock9 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Location
    NY
    Posts
    10
    The row source on my combo reads:
    Select IDno, FLD1, FLD2, FLD3
    the after update event in the Combo reads:
    me.text69=me.cboStandards.column(1)


    The Text69 control source reads:
    =cboStandards.column(1)

    I attached the error when I click on the combo box

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Robeen: most likely problem is that the column count property of the combo doesn't account for that column.

    Blade: you want one or the other, not both. You would generally not save the values, so try leaving the control source how it is and getting rid of the after update code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    Thanks, Paul. That was it exactly.
    The Column Count Property for the Comob Box was set to 2 and I needed it to be 3 to get the 4th field.
    It's working perfectly now.
    I learned something new!!

    Thanks!

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help Robeen. It happens all the time; you edit the row source and don't think to change the column count. Did it myself, which explains the dents in my forehead.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    bladelock9 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Location
    NY
    Posts
    10
    GOD!!! What am I doing wrong??? I tried what you said, however, the text boxes only have #Name? displayed in them when I run the form. Here is what in Combo67 row source:
    SELECT standards.ID, standards.field1, standards.field2, standards.field3 FROM standards ORDER BY [ID];

    In each of the four control source of the text boxes:
    =[Combo67].[Column](0)
    =[Combo67].[Column](1)
    =[Combo67].[Column](2)
    =[Combo67].[Column](3)
    they all display #NAME?

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    bladelock9 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Location
    NY
    Posts
    10

    I attached a copy of the MDB

    I appreicate your help, thank you

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Am I missing something?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    I get the #NAME? message when I run the Form - just like bladelock9 . . .

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Curious; what version are you each using? I've run it in 2007 and 2010 and it worked fine in both.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,593
    I'm using 2010.

    But . . .
    but . . . if I create a new form and put the compbo box on it and the text boxes . . . it all works fine.

    I was trying to see where the difference was when I got some real work to do . . .

  15. #15
    bladelock9 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Location
    NY
    Posts
    10
    at work i'm using 2003

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

Similar Threads

  1. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  2. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  3. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  4. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 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