I have a parent form with a sub form
so to refresh the form I am doing this
fine so far except that when caseworker reopens i get the first form(or the last if i choose)
But i want reopen the record i just closed
i found this & followed it
http://www.access-programmers.co.uk/forums/showthread.php?t=150210&referrerid=90628
and here is what I have
and
the problem is that i reopen the form i just closed but i can no longer navigate to the other parent form records, presumably because the filter is ON.
i tried setting filter to False but that didnt work (obviously i suppose
but you never know till you try!)
so how do i get round this
reopen the form i just closed without setting the filter to true
EDIT:
ooh yes that registry trick in the refered to thread looks clever
any pointers / links on how i would do that ????
so to refresh the form I am doing this
Code:
Private Sub Case_But_Click()
DoCmd.Close acForm, "Caseworker", acSaveNo
' do stuff here updating record set
DoCmd.OpenForm "Caseworker", acNormal
End Sub
fine so far except that when caseworker reopens i get the first form(or the last if i choose)
But i want reopen the record i just closed
i found this & followed it
http://www.access-programmers.co.uk/forums/showthread.php?t=150210&referrerid=90628
and here is what I have
Code:
Private Sub Form_Unload(Cancel As Integer)
LastRecordUsed = Me.ID
Debug.Print " Unload " & Me.ID
End Sub
and
Code:
Private Sub Form_Open(Cancel As Integer)
Debug.Print "open " & intLastRecordUsed
If intLastRecordUsed = 0 Then
DoCmd.Maximize
Else
Me.Filter = "[ID]=" & LastRecordUsed
Me.FilterOn = True
DoCmd.Maximize
End If
End Sub
the problem is that i reopen the form i just closed but i can no longer navigate to the other parent form records, presumably because the filter is ON.
i tried setting filter to False but that didnt work (obviously i suppose
so how do i get round this
reopen the form i just closed without setting the filter to true
EDIT:
ooh yes that registry trick in the refered to thread looks clever
any pointers / links on how i would do that ????