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  

Navigating in Continuous Form



 
 
Thread Tools Display Modes
  #1  
Old September 29th, 2005, 08:43 PM
SMBR
external usenet poster
 
Posts: n/a
Default Navigating in Continuous Form

Is there any way to navigate through a continuous form without using the tab
key. My form is set up with 10 fields, but some records may only require 2
fields. Is there a way for the user to go to the next record without tabbing
through the unused fields?
  #2  
Old September 29th, 2005, 10:43 PM
Ofer
external usenet poster
 
Posts: n/a
Default

What about pressing the arrow keys to go down to the next record?
Or do you want the user to press the TAB key and access to recognize that
there are no more values and move to the next record?

About the second option there are some code to be made.
One option will be, on the on current event of the form, to check if there
is value in the field and set the TabStop Property.

me.Field1Name.TabStop = not isnull(Me.Field1Name)
me.Field2Name.TabStop = not isnull(Me.Field2Name)
me.Field3Name.TabStop = not isnull(Me.Field3Name)
--
I hope that helped
Good luck


"SMBR" wrote:

Is there any way to navigate through a continuous form without using the tab
key. My form is set up with 10 fields, but some records may only require 2
fields. Is there a way for the user to go to the next record without tabbing
through the unused fields?

  #3  
Old September 30th, 2005, 03:06 AM
Albert D.Kallal
external usenet poster
 
Posts: n/a
Default

If you got datasheet, then the up/down arrows do work.

However, if you use a continues form (which is what I use *most* of the
time), then I simply add the following code to the form, and the up/down
arrow keys then work.

Add the code to the forms keydown event...

' key hand

Select Case KeyCode

Case vbKeyUp
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acPrevious

Case vbKeyDown
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acNext


End Select

You also have to set the forms "keypreview" to yes for the above to work...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.members.shaw.ca/AlbertKallal


  #4  
Old September 30th, 2005, 01:09 PM
SMBR
external usenet poster
 
Posts: n/a
Default

Thanks so much for your help!!!! I will give it a try.

"Albert D.Kallal" wrote:

If you got datasheet, then the up/down arrows do work.

However, if you use a continues form (which is what I use *most* of the
time), then I simply add the following code to the form, and the up/down
arrow keys then work.

Add the code to the forms keydown event...

' key hand

Select Case KeyCode

Case vbKeyUp
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acPrevious

Case vbKeyDown
KeyCode = 0
On Error Resume Next
DoCmd.GoToRecord acActiveDataObject, , acNext


End Select

You also have to set the forms "keypreview" to yes for the above to work...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.members.shaw.ca/AlbertKallal



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box NotInList - How To Add Data To Underlying Table 10SNUT Using Forms 19 July 8th, 2005 09:12 PM
ECHO Causing Problems DS General Discussion 5 May 17th, 2005 02:19 AM
Need to clear controls of Filter form Jan Il Using Forms 2 November 28th, 2004 02:04 PM
Continuous Subform / Form - Orphan records Rich J Using Forms 6 October 15th, 2004 08:59 PM
only in vertical on continuous form? joanu Using Forms 3 June 11th, 2004 12:00 AM


All times are GMT +1. The time now is 07:49 AM.


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