I am currently running Access 2000 and would lke some help. I don't understand why one pice of code will work one place but not another.
The below piece of code will work in the older legacy databases I have, but if I try and use it in a new database I've just created. I get type mismatch, and when I debug the
Set rst = db.OpenRecordset("calldata")
is highlighted.
Is the below an old way of doing things, so by default does not work in a newly created Access 2000 database, and if so what's the correct way of carrying out the below or if not any ideas why it's not working.
Hope you can help, its driving me mad
Dim db As Database
Set db = CurrentDb
Dim message As String
Dim email As String
Dim rst As Recordset
Set rst = db.OpenRecordset("calldata")
email = rst!PA
rst.MoveNext
Do While Not rst.EOF
email = email & ";" & rst!PA
rst.MoveNext
Loop
rst.Close
The below piece of code will work in the older legacy databases I have, but if I try and use it in a new database I've just created. I get type mismatch, and when I debug the
Set rst = db.OpenRecordset("calldata")
is highlighted.
Is the below an old way of doing things, so by default does not work in a newly created Access 2000 database, and if so what's the correct way of carrying out the below or if not any ideas why it's not working.
Hope you can help, its driving me mad
Dim db As Database
Set db = CurrentDb
Dim message As String
Dim email As String
Dim rst As Recordset
Set rst = db.OpenRecordset("calldata")
email = rst!PA
rst.MoveNext
Do While Not rst.EOF
email = email & ";" & rst!PA
rst.MoveNext
Loop
rst.Close