dbTalk Databases Forums  

How to force the curser to a next field in a datasheet form

comp.databases.ms-access comp.databases.ms-access


Discuss How to force the curser to a next field in a datasheet form in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Simon
 
Posts: n/a

Default How to force the curser to a next field in a datasheet form - 03-08-2008 , 06:23 AM






Dear reader,



How can I move the curser from one field to the next field in the record
after an action triggered by the event After click. The form is of the type
Datasheet.

The next code in the event After click: Docmd.GoToControl
"NextFieldName"

shows the error the command or action isn't available now. How can I force
the cursor to the next field in a form of the type DataSheet.



Thanks for any help.

Kind regards,

Simon




Reply With Quote
  #2  
Old   
Linq Adams via AccessMonster.com
 
Posts: n/a

Default Re: How to force the curser to a next field in a datasheet form - 03-08-2008 , 08:42 AM






Your question isn't very clear, but I assume you're trying to move to the
next field

1) After the current field is filled in

and

2) Without using <Tab> to move to the field in the Tab Order

In order to do this, the data in the first field has to always have the same
number of characters in it; how else would Access know when you were done
entering?

Where "X" is the length of the data in YourTextBox and NameOfNextField is
the next control to gain focus.

Private Sub YourTextBox_Change()
If Len(Me.YourTextBox.Text) = X Then NameOfNextField.SetFocus
End Sub

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200803/1


Reply With Quote
  #3  
Old   
Richard Rost
 
Posts: n/a

Default Re: How to force the curser to a next field in a datasheet form - 03-09-2008 , 02:21 AM



Cheezy solution: use the SENDKEYS function and send a TAB character.

Richard Rost
www.599CD.com



Quote:
How can I move the curser from one field to the next field in the record
after an action triggered by the event After click. The form is of the
type
Datasheet.



Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.