I wanted to create some custom function and it dosent work when I set strings.
For Example,
This works
But this dosentSet rst = CurrentDb.CreateQueryDef("Selected_Elements2", " SELECT * FROM Population ")
What's wrong with the second one?Dim zzz As String zzz = "Population" Set rst = CurrentDb.CreateQueryDef("Selected_Elements2", " SELECT * FROM " & zzz & ")
EDIT 2// Solved the second problem