When trying to get access with this code in a module I get an error stating that database in the dim db as database statement is user defined. Why?
Dim db As Database
Dim rs, rs1 As Recordset
Dim x, i As Integer
Dim sql, sql2, CaseNoteNo As String
Dim AdmissionDate As Date
Set db = CurrentDb