Createquerydef with multiple values

Carps

New member
Local time
Today, 00:55
Joined
Oct 3, 2002
Messages
5
Hello,

Can anyone help me I am trying to create a query based on multiple values I can do this for just one value using the code below but how do I go about coding this for multiple values.


CostCent = contains a list which looks like this Pay1, Cost1, Emp1

MYSQL = "SELECT [table local nhsnomroll].* FROM [table local nhsnomroll] "
MYSQL = MYSQL & "where ((([table local nhsnomroll].[dim_1]) = '" & costcentrestr & "'));"
Set RST = DB.CreateQueryDef(listdata, MYSQL)


Please could someone point me in the right direction.

Many Thanks
Dan.
 

Users who are viewing this thread

Back
Top Bottom