Tabbing from subform to main form

VBAhole22

Registered User.
Local time
Today, 08:16
Joined
Jan 18, 2002
Messages
117
I have a subform that is a login form for users to state their name and agency before they get to enter records on a main form. My problem is that when the user tabs out of the last field on the login subform they get a new record in that subform instead of going on to the main form. How can I set it up so that they tab onto the main form?
This subform is used on several different main forms so if I had to use an event like LostFocus could I code that into the login subform so that it wasn't specific to just one main form but just a generic one?

Thanks
 
Create a procedure that has two parameter. Then when you call the procedure from the LostFocus event pass the name of the first and last field to the procedure. In the procedure do something like this:

sub NAME (1st field, 2nd field)
place code to set focus to the 1st field.
end sub

This would be the first thing I try. You might want to consider using ADO and populate your field with the data in the Recordset. This may be the best way to solve your problem.

I hope what I mentioned above helps.

James
 

Users who are viewing this thread

Back
Top Bottom