Results 1 to 6 of 6
  1. #1
    pattrickcolin is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Location
    southend on sea
    Posts
    44

    Combobox returns multiple fields but not the ID number

    I have a Combobox on a subform.
    The Combo box is bound by the ID number.


    The Combobox returns multiple fields.
    Changing the column width to "0;3;3;......" it display the second field [product Name] etc

    Q How do I return the id Number without displaying it.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,545
    Quote Originally Posted by pattrickcolin View Post
    I have a Combobox on a subform.
    The Combo box is bound by the ID number.
    The Combobox returns multiple fields.
    Changing the column width to "0;3;3;......" it display the second field [product Name] etc

    Q How do I return the id Number without displaying it.
    It sounds as though it is already ready returning it. The first field which is probably the ID field is hidden by setting the column width property to "0". What is the the setting of the Bound Column prrperty and what is the setting of the Row Source property of the combo box.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    pattrickcolin is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Location
    southend on sea
    Posts
    44
    Bound Column Property = 1

    Row Source=SELECT DISTINCTROW [PARTSforDATABASE full].PartID, [PARTSforDATABASE full].PartName, [PARTSforDATABASE full].UnitPrice, [PARTSforDATABASE full].[1)Width], [PARTSforDATABASE full].[2)AspectRatio], [PARTSforDATABASE full].[3)Construction], [PARTSforDATABASE full].[4)RimDiameter], [PARTSforDATABASE full].[7)TyreName], [PARTSforDATABASE full].[5)LoadIndex], [PARTSforDATABASE full].[6)Speed-Rating], [PARTSforDATABASE full].Cost, [PARTSforDATABASE full].[8)FuelEfficiency], [PARTSforDATABASE full].[9)WetGrip], [PARTSforDATABASE full].[11)NoiseClass], [PARTSforDATABASE full].[10)NoiseBars], [PARTSforDATABASE full].[12)NotesOnTyre] FROM [PARTSforDATABASE full] ORDER BY [PARTSforDATABASE full].[1)Width], [PARTSforDATABASE full].[2)AspectRatio], [PARTSforDATABASE full].[3)Construction], [PARTSforDATABASE full].[4)RimDiameter], [PARTSforDATABASE full].[7)TyreName];

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,545
    Your combo has three columns (PartID,PartName,UnitPrice) but the first is hidden. The first column is also the bound column, so that is the value that will be saved to the bound field in the forms Record Source.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    pattrickcolin is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2014
    Location
    southend on sea
    Posts
    44
    Oh, now feel silly. Should have thought it through. The id nos was hidden, solved the problem.

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,545
    Quote Originally Posted by pattrickcolin View Post
    Oh, now feel silly. Should have thought it through. The id nos was hidden, solved the problem.
    Don't feel too bad. Sometimes we all have trouble seeing the wood for the trees.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. populate a field from multiple source fields using a combobox
    By tranquillity in forum Database Design
    Replies: 8
    Last Post: 09-13-2013, 06:46 PM
  2. Replies: 1
    Last Post: 06-24-2013, 05:14 PM
  3. Replies: 2
    Last Post: 04-10-2012, 12:30 AM
  4. Replies: 3
    Last Post: 08-24-2010, 07:40 PM
  5. Replies: 3
    Last Post: 02-20-2009, 02:28 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