Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Single Character form entry in a table
When I have a single character form field, I still must TAB to the next
field. Short of creating a macro, is there a way to advance the active cell cursor to the next single character field without hitting tab? For example - one of the fields is for date. So there are 9 single character fields - dd MON yyyy. User would like auto-advancement to the next character without having to TAB. Any ideas are appreciated. I do LOADS of these forms. |
#2
|
|||
|
|||
On Wed, 25 May 2005 11:34:02 -0700, Mary Sasiela
wrote: When I have a single character form field, I still must TAB to the next field. Short of creating a macro, is there a way to advance the active cell cursor to the next single character field without hitting tab? For example - one of the fields is for date. So there are 9 single character fields - dd MON yyyy. User would like auto-advancement to the next character without having to TAB. Any ideas are appreciated. I do LOADS of these forms. There's no way to make this work with form fields in the body of a protected document. Form fields simply don't respond that way. The alternative is to redo the form as a userform (a custom dialog); see http://www.word.mvps.org/FAQs/Userfo...eAUserForm.htm for a simple tutorial. To the code in the userform shown there, add a procedure like this one for each field that should accept one character and then jump to the next field: Private Sub TextBox1_Change() If Len(Trim(TextBox1.Value)) 0 Then TextBox2.SetFocus End If End Sub This procedure automatically runs each time the content of the field changes. It says that if the box is not empty and the character is not a space, then the cursor moves to the next field. Just out of curiosity, why do you have each character in a separate field? Why not three fields, one each for day, month, and year? (It's a valid way to represent the date, but it makes more work for whatever code has to check that it's a real date.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#3
|
|||
|
|||
Thanks for your response.
The client wants the forms like this. They send me "rough" forms that were done on a Macintosh & want me to mimic them. I suggested what you did, explained that it could be used for input to databases etc. But this is what they want - appearances/formatting seem important. Earlier in the process, I sent them userforms & they preferred not have them - thinking they were "too automated". Hope that answers your queries and ... thanks once again. "Jay Freedman" wrote: On Wed, 25 May 2005 11:34:02 -0700, Mary Sasiela wrote: When I have a single character form field, I still must TAB to the next field. Short of creating a macro, is there a way to advance the active cell cursor to the next single character field without hitting tab? For example - one of the fields is for date. So there are 9 single character fields - dd MON yyyy. User would like auto-advancement to the next character without having to TAB. Any ideas are appreciated. I do LOADS of these forms. There's no way to make this work with form fields in the body of a protected document. Form fields simply don't respond that way. The alternative is to redo the form as a userform (a custom dialog); see http://www.word.mvps.org/FAQs/Userfo...eAUserForm.htm for a simple tutorial. To the code in the userform shown there, add a procedure like this one for each field that should accept one character and then jump to the next field: Private Sub TextBox1_Change() If Len(Trim(TextBox1.Value)) 0 Then TextBox2.SetFocus End If End Sub This procedure automatically runs each time the content of the field changes. It says that if the box is not empty and the character is not a space, then the cursor moves to the next field. Just out of curiosity, why do you have each character in a separate field? Why not three fields, one each for day, month, and year? (It's a valid way to represent the date, but it makes more work for whatever code has to check that it's a real date.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
|
|||
|
|||
There's just no satisfying some people. Sorry...
-- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org On Wed, 25 May 2005 17:12:01 -0700, Mary Sasiela wrote: Thanks for your response. The client wants the forms like this. They send me "rough" forms that were done on a Macintosh & want me to mimic them. I suggested what you did, explained that it could be used for input to databases etc. But this is what they want - appearances/formatting seem important. Earlier in the process, I sent them userforms & they preferred not have them - thinking they were "too automated". Hope that answers your queries and ... thanks once again. "Jay Freedman" wrote: On Wed, 25 May 2005 11:34:02 -0700, Mary Sasiela wrote: When I have a single character form field, I still must TAB to the next field. Short of creating a macro, is there a way to advance the active cell cursor to the next single character field without hitting tab? For example - one of the fields is for date. So there are 9 single character fields - dd MON yyyy. User would like auto-advancement to the next character without having to TAB. Any ideas are appreciated. I do LOADS of these forms. There's no way to make this work with form fields in the body of a protected document. Form fields simply don't respond that way. The alternative is to redo the form as a userform (a custom dialog); see http://www.word.mvps.org/FAQs/Userfo...eAUserForm.htm for a simple tutorial. To the code in the userform shown there, add a procedure like this one for each field that should accept one character and then jump to the next field: Private Sub TextBox1_Change() If Len(Trim(TextBox1.Value)) 0 Then TextBox2.SetFocus End If End Sub This procedure automatically runs each time the content of the field changes. It says that if the box is not empty and the character is not a space, then the cursor moves to the next field. Just out of curiosity, why do you have each character in a separate field? Why not three fields, one each for day, month, and year? (It's a valid way to represent the date, but it makes more work for whatever code has to check that it's a real date.) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting photographs into a form created with a table | Tables | |||
Table headers/footers and layout | Page Layout | |||
Table AutoFormats vs. Table Styles confusion | Tables | |||
Table Gridlines in Word 2003 Form | Tables | |||
Using VBA to Add Table Row to Form Table | Tables |