Having a bit of trouble here. I have a date entry field at the end of a form. The field is set to “date only” and would normally validate ok when the user tabbed to the next field.
The form is e-mailed using a command button in a text box – the button runs a mailing macro.
I have found that you can write rubbish in the date field and because no tab occurrs when the command button is pressed, the field is not validated. So I thought I would force a tab by selecting the date field and tabbing to another field. These two lines are the first in the mailing sub:
ActiveDocument.Bookmarks(“disposal_date”).Range.Fields(1).Result.Select
SendKeys “{tab}”
I hve put another empty field after the date field and I hoped that tabbing out of the date field would force the validation. However, I cannot get the SendKeys to work. The field is selected okay but no tabbing happens.
Any ideas please?