When I activate frmList.List0, it positions at the end of the table:
- frmList
Private Sub Form_Activate()
Me.List0.SetFocus
Me.List0.ListIndex = Me.List0.ListCount - 1
-
When I DblClick a row in frmList.List0, I close frmList and open frmEdit to
edit record I clicked on:
-frmList
Private Sub List0_DblClick(Cancel As Integer)
Dim strWhere As String
strWhere = "WPS = " & Me.List0.Value
Zindex = Me.List0.ListIndex 'can Zindex somehow be used to reposition
when I activate next time?
DoCmd.Close
DoCmd.OpenForm "frmEdit", , , strWhere
End Sub
-
After I edit the record I exit frmEdit and activate frmList again:
-frmEdit
Private Sub cmdExit_Click()
DoCmd.Close
DoCmd.OpenForm "frmList"
End Sub
-
How can I return to frmList and have List0 positioned at the record I was on
when I DblClicked?
I tried changing the frmList activate event to:
-frmList
Private Sub Form_Activate()
Me.List0.SetFocus
If Not IsNull(Zindex) Then
Me.List0.ListIndex = Me.List0.ListCount - 1
Else
Me.List0.ListIndex = Zindex
End If
-
But this is not working.
Please help
Bill