Taking Focus off datagrid

  • Thread starter Thread starter kenglish_hi
  • Start date Start date
K

kenglish_hi

hello,
I have a form with a datagrid and combo box. When the form loads up,
i want the focus to be on the combo box. however, whenever it loads up,
the focus is always on the datagrid. in the Form.Load, i tried both
combo.focus() and combo.select(), neither of them will take the focus
away from the datagrid and put it on the combo box. Anyone know how to
do this?

Kevin
 
I have run into similar issues. I generally will add a snipit of Javascript
code at the bottom of the page to redirect focus to an HTML element of my
choosing (textbox, combo, etc).

<script>
document.a.cust_no.focus();
</script>


Hope this helps...

Rich
 
I use both, first select, then set focus:
Me.ComboBox1.Select()

Me.ComboBox1.Focus()

I think by default the control selected on load is the one with the lowest
tab index.
 
Back
Top