How do you set the focus to a control in vbScript?
My code here doesn't seem to like the line TheForm.InHouse.SetFocus
Code:<SCRIPT LANGUAGE="VBSCRIPT"> <!-- hide script from older browsers Sub cmdSubmit_OnClick Dim TheForm Set TheForm = Document.forms("frmSubmit") If TheForm.InHouse.Value = "" Then MsgBox "Please enter a value for In House", 0, "Census Report" TheForm.InHouse.SetFocus Else TheForm.Submit End If End Sub --> </SCRIPT>


Reply With Quote