Hello,
I am trying to load a double clicked record within a datasheet on the form. I am using the following to load the record:
Code:
Private Sub assoc_name_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_error_entry"
stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![frm_error_entry].SetFocus
End Sub
This is kind of funky... sometimes when I double click the record it loads the form blank on a new record instead of allowing us to edit the matching record in the original entry form. The other issue is, the .setfocus is acting up too... the form gets loaded but then it goes back to the form the record was double clicked on instead of stating focus on frm_error_entry. Is there a better way to take care of this? I verified there is no code on load/focus etc that would be throwing focus back to the original form.
Any ideas?