Are you sure you're referring to the control on the subform correctly? Suppose you had a form called frmMyMainForm and a subform called sfrMySubForm. On the subform you had a textbox called txtMyTextBox. Then on the button's On Click event, setting the focus would look something like this.
Button is on the main form:
Me.sfrMySubForm.Form.txtMyTextBox.SetFocus
Button is on the subform:
Me.txtMyTextBox.SetFocus
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|