G
Guest
Hello,
I'm getting an error message saying that "User Defined Type not Defined"
regarding the second line of code here (Dim db as DATABASE). I know this is a
shot in the dark but could somebody be able to tell me why that's happening?
I'm fairly new to VBA so take pity on me
Public Sub CreateCountryRS()
Dim db as DATABASE, rs as RecordSet
Dim a as String
DoCmd.Hourglass True
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblCountry")
Do Until rs.EOF
a = a + rs![Country] + Chr$(10)
rs.MoveNext
Loop
DoCmd.Hourglass False
MsgBox a
rs.Close
End Sub
I'm getting an error message saying that "User Defined Type not Defined"
regarding the second line of code here (Dim db as DATABASE). I know this is a
shot in the dark but could somebody be able to tell me why that's happening?
I'm fairly new to VBA so take pity on me
Public Sub CreateCountryRS()
Dim db as DATABASE, rs as RecordSet
Dim a as String
DoCmd.Hourglass True
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblCountry")
Do Until rs.EOF
a = a + rs![Country] + Chr$(10)
rs.MoveNext
Loop
DoCmd.Hourglass False
MsgBox a
rs.Close
End Sub