Assigning SQL to a string variable

Softweb

Registered User.
Local time
Today, 13:19
Joined
Feb 12, 2017
Messages
18
Can anyone tell me how to assign the following SQL to a string variable in MS Access 16 so that it can be assigned to a ListBox RowSource. I’ve tried it unsuccessfully but I think my syntax is wrong.

SELECT tblSubjectToday.SubjectToday, tblSubjectToday.IsPending, tblSubjectToday.Training_ID
FROM tblSubjectToday
WHERE (((tblSubjectToday.Training_ID)=[Forms]![frmClient]![frmTraining].[intTrainingID]));

I want to do the following:

strRowSource = ??

lstList.RowSource = strRowsource


Thanks Chris
 
Thanks Minty that's really useful. I'll try it out. Chris
 

Users who are viewing this thread

Back
Top Bottom