I can think of a way, but it is a little convoluted so bear with me.
Insert your public sub in a module (remember not to name the two the same)
I would create your initial button on a form, and have a simple command behind that.
Code:
docmd.openform "Frm_dir_maker", , , , achidden
Create the new form and set the recordsource to be your query.
Then in the new forms open event you want something along the lines of:
Code:
dim qty as integer
dim x as integer
qty=dcount("[fullpath]","[qryfullpath]")
for x=1 to qty
docmd.gotorecord , , acgoto, x
mkdir([fullpath])
next
docmd.close
give it a try no promises as always, but if you have a problem, shout and hopefully by then i will have woken up a little!