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.
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.