Minggu, 25 November 2012

[MS_AccessPros] Problem referencing values in query

 

Hi all,
I am having a problem retrieving values from a query. I am using Access 2010 on Windows 7. The following is the code where the issue exist. The issue is the MsgBox in the DO WHILE loop. After the record set is open ONE record exist. However, when trying to display a couple of the values an error is generated indicating the information does not exist. "Error 3265, Item not found in this collection." When the query is run standalone the field names appear with the appropriate data.
Any suggestions, I will continue to research the issue. Thank you for your time.
Rod
------------------------------------
Private Sub Process_XL_Records()
Dim rst As DAO.Recordset
Dim tmpStr As String

'Set some local parameters for queries

Set rst = CurrentDb.OpenRecordset("New_License_Without_Matching_tblTaxpayer")
MsgBox "Record count = " & rst.RecordCount

rst.MoveFirst
Do While Not rst.EOF

MsgBox rst![LICENSE DT] & " - " & rst![LOCATION STREET]
tmpStr = ""

rst.MoveNext
Loop
rst.Close
Set rst = Nothing 'Deassign all objects.
End Sub

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar