Results 1 to 2 of 2
  1. #1
    edzigns is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Apr 2011
    Posts
    8

    Pulling up record ID instead of combo box value

    So I have a combo box for techs and a mail function built to pre-populate information in an email. What happens is it pulls the tech (or Assigned To) record ID value, not the name, i.e.



    ...closed by 7... instead of ....closed by FirstName LastName....
    I have tried to use strHelpDesk = Me.[Assigned To].column2 to no avail.

    Here is my code:

    '-- Helpdesk employee ticket assigned to
    strHelpDesk = Me.[Assigned To]

    '--Email subject and details
    stSubject = "Ticket: " & stTicketID & " has been closed"
    stText = "Ticket number: " & stTicketID & " for " & stDetails & " was closed by " & strHelpDesk & " on: " & RecDate & Chr$(13) & Chr$(13) & "If this ticket was closed in error, please contact the Help Desk to re-open ticket." & Chr$(13) & "This is an automated message." & _ " Please do not respond to this e-mail."

    My Combo Box for Assigned To:
    SELECT Techs.ID, Techs.[FirstName] & " " & Techs.[LastName] AS Expr1 FROM Techs ORDER BY Techs.[FirstName];

  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,922
    The index is zero based so you want Column(1) not Column(2).

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

Similar Threads

  1. Replies: 5
    Last Post: 11-13-2010, 04:56 PM
  2. Pop-up Combo Box Record Selection
    By AKQTS in forum Forms
    Replies: 1
    Last Post: 08-11-2010, 01:01 PM
  3. new record with combo box?
    By razoRjaw in forum Forms
    Replies: 1
    Last Post: 10-06-2009, 04:33 AM
  4. Pulling Record Info From Sub Form
    By redlich23 in forum Forms
    Replies: 1
    Last Post: 09-02-2009, 02:10 PM
  5. if record not found through combo box
    By wasim_sono in forum Forms
    Replies: 2
    Last Post: 08-04-2008, 06:32 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