Unanswered: Problem with finding data in a Recordset
I have a backend SQL Server and an adp access front end.
On my contacts form I have a list box which lists all the available addresses for a contact and its bound column is the address ID.
If the user wants to view the address I have a button which the user can click to see the Address form, here is the code that I use:
If IsNull(Me!CompAdrsPersonList) = True Then
strMsg = "You have not selected an address to view/edit." & Chr(13)
strMsg = strMsg & "Please select an address from the Company Address list."
MsgBox strMsg, vbCritical, "Select a Company Address"
If CurrentProject.AllForms("frmCompanyAdrsForContact" ).IsLoaded = False Then
Set RS = Forms!frmCompanyAdrsForContact.Recordset.Clone
RS.Find "[CompAdrsID]=" & Me!CompAdrsPersonList
If Not RS.EOF Then Forms!frmCompanyAdrsForContact.Bookmark = RS.Bookmark
My problem is that for some records the Recordset returns EOF and I can't understand why?? because I'm sure that the address id exists in the table.
I thought that the ID is not being passed in some cases so I created a message box msgbox Me!CompAdrsPersonList, and i saw that all the values are passed but the wierd thing was that when I put a message box, for the same record that would return EOF, it wouldn't return EOF after I hit the OK button of the message!!!
In general for the same records that retunr EOF, when I open the new form and navigate it woudln't return EOF?!