Re: Combo Box Source from Same Table



"MM Spirit Guide" wrote

> SELECT tblPeople.ID, tblPeople.LastName, tblPeople.FirstName FROM
> tblPeople
> where tblPeople.HeadofHousehold = YES;
>
> Now what is happening is that it the combo box shows ONLY the IDs...
> so I get a list:
> 1
> 4
>
> Whereas I want it to show:
> 1 Smith John
> 4 Peeves George
>
> Any idea how to make it happen?

In your Combo Box properties, select a Column Count of 3 (in the Format
tab), and a Bound Column of 1 (in the Data Tab).

I'd use a calculated Field so that the name showed as "Smith, John",
"Peeves, George" -- the following is the SQL of the RowSource I use in a
very similar combo box:

SELECT [LastName] & ", " & [FirstName] AS EmpName, Employees.EmployeeID
FROM Employees
ORDER BY Employees.LastName, Employees.FirstName;

with Columns = 2, Bound Column = 2, and Column Widths = 1.5"; 0", it only
shows the names but is bound on the EmployeeID column. There's no need to
display the ID value -- it's only for your own internal use. It would show
the user just

Smith, John
Peeves, George

Larry Linson
Microsoft Access MVP


.



Relevant Pages

  • Re: Mail merge
    ... Assuming it's the same as in the PC environment, I'd have thought you could control the print paramters by setting up the paper source definitions in your mailmerge main document - before executing the merge. ... John, Smith, Jan, 10 ... > The merge involves a 2 page letter and pages for coupons. ...
    (microsoft.public.mac.office.excel)
  • Re: "Please tell me your name?"
    ... Smith being the family name and John the given name (= Christian ... They also often include grandparents' surnames as well: John Smith Jones Cooper Danks. ... I know someone who told me that he and his two brothers have three different surnames because they made different choices. ...
    (alt.usage.english)
  • Re: YOU THINK I AM A SUCKER , John ( R ) Smith?
    ... Three kinds of qualities could be asserted to John Smith ... Luis Amaral Afonso ... his assertion that using HIS TABLE WE ARE able to get CONFIDENCE INTERVALS of the K-S TEXT .when the Population mean and std, ...
    (sci.stat.math)
  • Re: "Doctor Who" Matt Smith signs 5 year deal to play The Doctor
    ... whenjohn smith wrote in message ... wrote in message john ... you missed the "s" off it, or is that not a spelling mistake? ... NOT a spelling mistake like the OP ...
    (rec.arts.drwho)
  • Re: Mail merge
    ... John, Smith, Jan, 10 ... Note that the fields bounded by the chevrons are part of the mergefields inserted via 'Insert Merge field' on the mailmerge ... The merge involves a 2 page letter and pages for coupons. ...
    (microsoft.public.mac.office.excel)