YES, this works. Thank you very much
tell application id "DNtp"
try
set theGroup to current group
set theQuery to "kind:any"
set theName to (theQuery & " in: " & (name of theGroup)) as string
set theSmartGroup to create record with {type:smart group, search predicates:theQuery, name:theName} in theGroup
set search group of theSmartGroup to theGroup
open window for record theSmartGroup
activate
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
return
end try
end tell