I been using this code to email the staff every day when there password has 14 days until it locks them out. It logs to a text file and off it goes i want it to log to a db and not to a text files as i had befor. But i am missing somthing it write and updates the db but adds the same user in 39 times. Then does the next user 39 times. It's getting the 39 becasue there are 39 users that need to change there windoes password.
I must be missing somthing but i don't know what i think i am putting the write db code in the worng place.
The code is in the text file i attached to this post
Dim strPrinterQry : strPrinterQry = "Select * From users "
Shouldn't this have a where clause? Something like
Dim strPrinterQry : strPrinterQry = "Select * From users WHERE expire_date <= " & now() + 14
using properly formatted dates and 14 day intervals? This would limit the recordset to only those users whose passwords expire in the next 14 days...
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert