Tab order

Rich31

New member
Local time
Today, 09:41
Joined
Dec 3, 2003
Messages
7
I have a have a form that needs to tab from the detail to the footer on lost focus. Is there something wrong with my code?

Private Sub QA_Count_LostFocus()
Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("QA_Count")
If CurrentRecord = rst.RecordCount Then
DoCmd.GoToControl "UPDATE"
Else
rst.Close
End If
End Sub

Thanks Rich
 
Not sure exactly how your code is supposed to achieve what you want it to do. It seems like it's checking to see if the current record is the last record in the recordset, but the code isn't doing even that correctly.

When exactly do you want the focus to move to the footer from the detail? On every record? On just one particular record (like the last record)?
 
The tab should move when the last record is updated.
 

Users who are viewing this thread

Back
Top Bottom