Please make it clear if it involves a MS Access database (because you posted this in the MS Access forum) or a SQL Server database (like you mention in the post).
If it involves SQL:
- Check for any errors in the SQL Error log
- Check if the login you use still exists on the instance
- Check if the login has the correct permissions on the database
- Check if the login is connected to the user in the database: use {db_name};exec sp_change_users_login 'Report'
If it involves MS Access:
- Can you manually start MS Access, open the database and execute the command (using the user credentials you use in the code)