Solved Open Form B from Form A button click and after Form B opens call Sub on From B (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:39
Joined
Feb 19, 2002
Messages
43,297
just would of liked it to open from this form when button click with Tab 0 FirstName_fld with focus.
You don't do this with code, you do it with property settings. Change the tab order of the field you want to have the focus when the form opens to 0. Usually the tab order will be the visible order of controls on a form but it doesn't have to be. The control with a Tab Index = 0 will be where the focus is when the form opens.

You also don't need code to position the record. Use the Where argument of the OpenForm method. So, instead of four lines of code, you only need ONE.
 

Users who are viewing this thread

Top Bottom