Tabbing Subform Issue

Jerry8989

Registered User.
Local time
Today, 02:32
Joined
Mar 16, 2006
Messages
64
Hello,
I'm having an issue with tabbing in my subform. I have 20 fields per record. I have the "Tab Stop" Set to "yes" for 17 of the 20 fields. So only 3 combo boxes are tabbed too. They are the only editable fields on the record. So after record one is tabbed through it goes to record 2 and so on until the last record in the sub form. On the last record it just cycles through the 3 fields within the last record. Is there an event I can fire off that will allow me to do a check then set focus on a field in a different sub form or the main form?

I'm trying to make it a seamless process while using the keyboard. I'm trying to set the user up to so they don't have to stop working to click around the form.

Thank you for any help
 
On the last field use the 'on key press' event with,
If KeyAscii = 9 Then 'TAB Key
'do what ever
End If

Hope this helps
Regards
Denis
 
Denis,
How will it know that it is the last record? The same 3 fields repeat for every record and I only want to do this on the last record.

Thank You
 
Denis,
How will it know that it is the last record? The same 3 fields repeat for every record and I only want to do this on the last record.

Thank You

Well, I am assuming that you have an ID field. You could do something like this:

Code:
Dim lngLastIdNum as long
 
lngLastIdNum = Dmax("[IdNumber]","TableName")
 
if lngLastIdNum = Me.IdNumber then
  'Do what you need to do
end if
 
scooterbug,
Thank you that helped lead me in the right direction.
I compare the row nums against the number of records in that subform and compare till I hit the last one and set my focus after that.

thanks
 

Users who are viewing this thread

Back
Top Bottom