Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textbox <> listbox in report

Status
Not open for further replies.

Smarty

Programmer
Apr 12, 2001
191
BE
I'm making a report that has information from several tables. I can display the staffmember, instead of his ID when i use a listbox (2 cols with sql statement), but is it possible to display the name (that is in another table) in a textbox (i have the sql statement: select [Personel].[initials] from Personel where [Personel].[ID_Personel] = [tasks].[ID_Personel])

and if not, how is it possible to let the listbox look like a textbox, because the first (and only) item is selected (and comes with a black background instead of a white one)

thanx for your appreciated help!

Maarten
 
There is function that looks up a value in a table:
DLookUp(WhatField;InWhatTableOrQuery;WhatConditions).
So you could set the source of your textbox to:
=DLookUp("initials";"personel";"id_personel=tasks")
However, easier and faster is to make query joining the personel-table to the others. Set the datasource of your report to this query, and that's all there is to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top