Results 1 to 6 of 6
  1. #1
    Join Date
    May 2011
    Location
    New Zealand
    Posts
    11

    Unanswered: Displaying first and last name in combo box

    I've just set up a form for my tbl_hireOut in my rental database. I would like my customer's first and last name to appear next to the Cust_ID when scrolling through the list(to ensure the correct customer is selected before selecting it). I've tried doing this by clicking on the Cust_ID in the Detail area. Then I clicked on the Property Sheet of my combo box. I've set the column count to 3, changed the column widths and set column heads to Yes. This should work, but it doesn't. Well, it works for the Cust_ID but I want all three to appear next to each other. Any help would be very much appreciated!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What's in the RowSource property of the combo?
    Have a nice day!

  3. #3
    Join Date
    May 2011
    Location
    New Zealand
    Posts
    11

    Displaying first and last name in combo box

    Its tblCUSTOMERS

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,422
    Provided Answers: 7
    in the combox Row Source you need to write a query
    1 col customerID
    2 Firstname & " " & SurName
    sql look some like
    "SELECT Cust.CustID, [First] & " " & [Surname] AS Expr1 FROM Cust;"

    in the Coloumn count = 2
    Column Widths 0;2.5cm
    Bound Column =1

    its the column Width that does the trick
    1st col is 0 widths so its hidden
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  5. #5
    Join Date
    May 2011
    Location
    New Zealand
    Posts
    11

    Displaying first and last name in combo box

    brilliant! Thanks!

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    personally I'd suggest surname then first name, then you can use the keyboard shortcut to find the customer.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •