B
Brian
Hello All,
I am trying to read the contents of a Query called CustName. It is a listing
of customer names and their ID Number.
When I try to read this query using the following code, I get a "Invalid
Operation" error code 3219.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("CustName", dbOpenTable)
rs.MoveLast
rs.MoveFirst
Do Until rs.EOF
If rs!CustID = Me.CustID Then
Me.CustName.Caption = rs!CustName
End If
rs.MoveNext
Loop
closeoutRoutine:
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
What the heck have I missed?
Thanks in advance.
BRC
I am trying to read the contents of a Query called CustName. It is a listing
of customer names and their ID Number.
When I try to read this query using the following code, I get a "Invalid
Operation" error code 3219.
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("CustName", dbOpenTable)
rs.MoveLast
rs.MoveFirst
Do Until rs.EOF
If rs!CustID = Me.CustID Then
Me.CustName.Caption = rs!CustName
End If
rs.MoveNext
Loop
closeoutRoutine:
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
What the heck have I missed?
Thanks in advance.
BRC