Sendkeys statements

M

mscertified

Converting Access 97 to 2000, I'm coming across many SENDKEYS ststements
which the MS Conversion white paper warns about.
How do I convert:
Sendkeys "{TAB}"
Sendkeys "{ESC 2}"

Are these safe to leave in?
I have no idea what the second statement above does but its executed when
canceling an update of a table.
 
A

Allen Browne

Tab moves to the next field. SetFocus to the desired control, e.g.:
Me.[Text99].SetFocus

Esc twice undoes the changes to the record. Replace with:
If Me.Dirty Then Me.Undo
 
M

mscertified

Fair Dinkum, Thanks a lot

Allen Browne said:
Tab moves to the next field. SetFocus to the desired control, e.g.:
Me.[Text99].SetFocus

Esc twice undoes the changes to the record. Replace with:
If Me.Dirty Then Me.Undo

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

mscertified said:
Converting Access 97 to 2000, I'm coming across many SENDKEYS ststements
which the MS Conversion white paper warns about.
How do I convert:
Sendkeys "{TAB}"
Sendkeys "{ESC 2}"

Are these safe to leave in?
I have no idea what the second statement above does but its executed when
canceling an update of a table.
 
Top