Want only a single record in a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the subform, when I complete entering all of the fields in the 1st
record/row, the second record/row automatially appears. I want the
capability to enter field values in a single record/row and then the tab
should leave the subform and return to the main form. Currently, the tab
moves to the first field in record/row 2. (I will not be entering data in
record/row 2.) Any ideas?
 
Try adding an unbound TextBox as the last Control in he Tab Order in the
Subform and use the GotFocus Event of this TextBox to run code to go back to
the Main Form.

HTH
Van T. Dinh
MVP (Access)
 
In the subform, when I complete entering all of the fields in the 1st
record/row, the second record/row automatially appears. I want the
capability to enter field values in a single record/row and then the tab
should leave the subform and return to the main form. Currently, the tab
moves to the first field in record/row 2. (I will not be entering data in
record/row 2.) Any ideas?

One way to do this is to put a textbox LAST in the tab order on the
subform; it should be unbound, but it must be visible and enabled for
the code to work. You can make its height and width zero to keep the
user from mouseclicking into it.

In this textbox's GotFocus event put code like

Private Sub txtRelay_GotFocus
Parent!txtNextControl.SetFocus
End Sub

John W. Vinson[MVP]
 
¹ã·ºµÄ
Van T. Dinh said:
Try adding an unbound TextBox as the last Control in he Tab Order in the
Subform and use the GotFocus Event of this TextBox to run code to go back to
the Main Form.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top