Suddenly code that has been working day in and day out is giving me an error and I haven't changed anything. This is the section of code that crashes:
Dim db As Database 'Current database.
Dim lng As Long 'Loop controller.
Dim rs As DAO.Recordset 'Table to append to.
The error message is "User-defined type not defined."
If I comment out the first line it makes it to the third line before giving the same message. What might cause this to happen? As I said I have done no programming since last time it was working and it still works in my backups. (I would just restore a backup, but I'd have a lot of data to sort out from today and I'd prefer to understand what's going on anyway.)
Thanks.
Dim db As Database 'Current database.
Dim lng As Long 'Loop controller.
Dim rs As DAO.Recordset 'Table to append to.
The error message is "User-defined type not defined."
If I comment out the first line it makes it to the third line before giving the same message. What might cause this to happen? As I said I have done no programming since last time it was working and it still works in my backups. (I would just restore a backup, but I'd have a lot of data to sort out from today and I'd prefer to understand what's going on anyway.)
Thanks.