SetValue Macro

khurram7x

Registered User.
Local time
Today, 09:15
Joined
Mar 4, 2015
Messages
226
What is wrong with this macro please:
SetValue
Item=[Forms]![frmEmployee]![TrainingID]
Expression='SELECT tblTraining.ID, tblTraining.Description FROM tblTraining WHERE (((tblTraining.JobTitle.Value)=[Forms]![frmEmployee]![JobTitle])) ORDER BY tblTraining.Description'

When I run this, i receive message that says... 'Cannot perform this operation' and when i press help on this box it shows me Error 3032. What am i doing wrong please??

Thanks.
 
I doubt you can use SQL there. Try a DLookup().
 
I doubt you can use SQL there. Try a DLookup().
Thanks pbaldy. I'm using this query to fill up a combo box, while dquery() returns a single value.
How could i fix that please??
 
You can set the row source to SQL. you can't set the value to SQL.
 

Users who are viewing this thread

Back
Top Bottom