Have you got the Access database open when you run it? I think that would stop it writing to the database