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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get data into textbox from related table via query 1

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
I am using a listbox to get a fields content via query

SELECT TXMASTERS.ID1, TXMASTERS.SportorSports AS Sport
FROM TXMASTERS
WHERE (((TXMASTERS.ID1)=[forms]![Courses].[Form].[ID1]));

On cyling records, the listbox fills with a single particular value from a related table. I am wanting to capture the content of the listbox value.

Is there a way to get this via a dlookup method. I have no experience of Dlookups so I don't know if this is the correct road. Many thanks
 
try
me.textbox = me.listbox

or

me.textbox = me.listbox.column(x)
 
Sorry, I was not as clear as I should. Is there a way to get this data without using a listbox/query. Regards
 
dlookup("TXMASTERS.SportorSports","TXMASTERS","TXMASTERS.ID1=" & [forms]![Courses].[Form].[ID1])
 
Thats it, perfect. Many thanks, another star. Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top