This was not possible in Access 97 & before.
In Access 2000, 2002 or 2003 they added a method to do it
programatcially, but I can't for the life of me find it again! That new
method is probably only available in ADO, not DAO. Maybe someone else
can jump in here.
For another solution, do a search for TSIMDW. I gather that this worked
fine for Access versions up to 97 (using Jet 3), but I don't know if it
works for later versions (Jet 4).
Since the workgroup file is just an Access database "under the hood",
it's tempting to try & create the relevant tables & queries manually
(in a new database). No can do! Try it yourself, you'll soon see why.
HTH,
TC