YES, my guess would be that since the message says "invalid outside procedure", you forgot to put the code I posted INSIDE your actual procedure declaration lines. for instance:
Code:
private sub button_click()
end sub
that possible?? 
I know you said otherwise though. Care to post your entire procedure?? my other guess would be that if you did this:
Code:
.initialfilename = "directory" & me.lastname
you should be fine. spaces in field names on forms are automatically translated to (_) underscores in code references (I think). So your code might look like "last_name"