Open form with field selected

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

Guest

Can anyone please tell me how I set a form so that when it is opened the
cursor is flashing in the first field and the user does not have to click on
it before starting typing?

Thanks
Dudley
 
Thanks very much Jon. I have tried switching to HTML view and inserting your
text at various places near the beginning of the page but it did not work.
Can you tell me where I put your text?

Thanks
Dudley

Jon Spivey said:
Hi Dudley,

<body onload="document.forms[0].fields[0].focus();">

--
Cheers,
Jon
Microsoft MVP

Dudley said:
Can anyone please tell me how I set a form so that when it is opened the
cursor is flashing in the first field and the user does not have to click
on
it before starting typing?

Thanks
Dudley
 
Dudley said:
Thanks very much Jon. I have tried switching to HTML view and
inserting your text at various places near the beginning of the page
but it did not work. Can you tell me where I put your text?

Thanks
Dudley

I am not Jon, but in case this answer gets to you sooner.

Find the line with <body>.
Completely replace <body> with <body onload="document.forms[0].fields[0].focus();">
 
Hi Trevor and Jon,

Thanks very much for your help. I could not get that code to work, but the
following did work:

<body onload="document.forms[0].NameOfCompany.focus()">

Many thanks
Dudley

Trevor L. said:
Dudley said:
Thanks very much Jon. I have tried switching to HTML view and
inserting your text at various places near the beginning of the page
but it did not work. Can you tell me where I put your text?

Thanks
Dudley

I am not Jon, but in case this answer gets to you sooner.

Find the line with <body>.
Completely replace <body> with <body onload="document.forms[0].fields[0].focus();">
 
Dudley said:
Hi Trevor and Jon,

Thanks very much for your help. I could not get that code to work,
but the following did work:

<body onload="document.forms[0].NameOfCompany.focus()">

Many thanks
Dudley

Great.

I don't know why the other didn't work, but it doesn't matter now :-))
 
Back
Top