A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

AutoSkip



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2006, 06:26 PM posted to microsoft.public.access.forms
Anna
external usenet poster
 
Posts: 66
Default AutoSkip

Can any one please help me why it dont works?

Private Sub Date1_KeyPress(KeyAscii As Integer)
If Len(Nz(Me.Date1, "")) = 6 Then
Me.Date2.SetFocus
End If

End Sub

Thank You.

  #2  
Old August 30th, 2006, 06:35 PM posted to microsoft.public.access.forms
BruceM
external usenet poster
 
Posts: 356
Default AutoSkip

Two possibilities occur to me. One, why the KeyPress event? That is a
rather specialized event, which may be different from what you expect. What
would you like to have happen? Two, if a control and a field have the same
name (e.g. if Date2 is both the field and the text box name) you could have
difficulties. If so, try changing the name of the text box to txtDate1 or
something like that.

"Anna" wrote in message
oups.com...
Can any one please help me why it dont works?

Private Sub Date1_KeyPress(KeyAscii As Integer)
If Len(Nz(Me.Date1, "")) = 6 Then
Me.Date2.SetFocus
End If

End Sub

Thank You.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.