Results 1 to 6 of 6
  1. #1
    dylcon is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Ann Arbor
    Posts
    130

    Using combobox ID for form, linked value for msgbox

    I have a combobox where you select a part number, which links the ID to another table, which works perfectly fine. I want my message box to give the actual part number to the user, but right now, it is only giving the ID. My code is:



    Code:
        MsgBox (Me.PartNumbercbo & " has been added to inventory as an incoming part")
    Is there any way to achieve this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have the PartNumber in the RowSource of the cbo?

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Presuming the field you want is in the combo's row source:

    Me.PartNumbercbo.Column(x)

    where x is the zero-based number of the column containing the value you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    Oops, slow fingers. Sorry Allan.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by pbaldy View Post
    Oops, slow fingers. Sorry Allan.
    Your answer is more complete than mine.

  6. #6
    dylcon is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Ann Arbor
    Posts
    130
    Thank a lot to the both of you!

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

Similar Threads

  1. Replies: 9
    Last Post: 01-17-2013, 09:08 PM
  2. Combobox control for linked form/subform
    By Dbusse706 in forum Access
    Replies: 2
    Last Post: 07-03-2012, 07:49 PM
  3. Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. Replies: 0
    Last Post: 08-24-2010, 06:38 PM
  5. Replies: 0
    Last Post: 12-16-2009, 01:14 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