Let me give a little more background:
The form and subform have three procedures in their code pages. I tried putting a breakpoint in each sub. The forms throws the error even if the breakpoints are never activated. If focus is in any of the main form text boxes, it throws the error when I try to navigate to the next main form almost every time. Note, I said almost.
If I can get focus in my listbox, or in one of the subform textboxes, I can navigate every which way through the records.
I've attached a picture of the form.
So one of my problems is figuring out what is actually throwing the error so I can post code that seems responsible.
This code is fired off when a user clicks on one of the descriptions in the list on the right of the dialog.
Code:
Private Sub List_Descriptions_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Resumes_Expsubform.Form.Recordset.Clone
rs.FindFirst "Description = '" & Me!
[List_Descriptions] & "'"
If Not rs.EOF Then Me.Resumes_Expsubform.Form.Bookmark = rs.Bookmark
End Sub
And this code fires off when the user navigates to a new record in the main form. This is when I see the error message.
Code:
Private Sub Form_Current()
RequeryList
Me.List_Descriptions.Selected(0) = True
End Sub
Public Sub RequeryList()
Dim ctlListbox As Control
' Return Control object pointing to a combo box.
Set ctlListbox = Forms![Staff Resumes]!List_Descriptions
' Requery source of data for list box.
ctlListbox.Requery
End Sub
And this code fires off when a user navigates to a new record on the subform
Code:
Private Sub Form_Current()
' RequeryList
Forms![Staff Resumes]!List_Descriptions.Selected(Me.CurrentRecord - 1) = True
End Sub
I never get the error while navigating subform records. Only when navigating main form records does it throw the error.
Each form's record source is a linked table in another database. There is a query that is the source of the Listbox:
Code:
SELECT DISTINCT Resumes_Exp.Description
FROM Resumes INNER JOIN Resumes_Exp ON Resumes.ID = Resumes_Exp.ID
WHERE (((Resumes.ID) In (Select Resumes_Exp.ID from Resumes_Exp
WHERE ([forms]![Staff Resumes]![ID])=[Resumes_Exp].[ID])));
Hope this helps...