By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

Tab down through a continuous form- new records first then same in new field Acc 2003

P: 1
Hi all,

Please excuse me if this is incorrect I am new to MS access and this Forum and appreciate any advice on posting.

I would Like the Tab key on the key board to take the cursor down through a continuous form then across (am happy to do the across bit manually) and continue down the next field. I have looked all over the internet for answers but found only turning the "tab stop" to off. This only works when you only want to go down one of the columns (multiple records in one field)...
Does anyone have any VBA code or tips for the Tab key moving through all the records (in one field) on a continuous form before being taken across to the other fields on the form (then being capable of going down the next field the same)?

the (standard) "Tab order" does obviously not work because it is a continuous form and Tab order doesn't have the option of down the records first.

thanks in advance for your time

Miki
Jul 2 '09 #1
Share this Question
Share on Google+
1 Reply


beacon
100+
P: 579
Hi Miki,

Check out this webpage: http://www.techonthenet.com/access/f...ol_nextrec.php

I chose a slightly different method because it prevents you from having to set the key down for every field on your continuous form. I use the Form_KeyPress event to move the cursor down no matter what field you are on for the current record.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_KeyPress(KeyAscii As Integer)
  2.     Dim myKey
  3.  
  4.     myKey = KeyAscii
  5.  
  6.     If myKey = 9 Then               'Tab key is pressed
  7.         Me.YourField.SetFocus   'Sub YourField with any field on your form. I used the first field on my form.
  8.         DoCmd.GoToRecord       'Go to record will move to the next instance of (or set the focus to) YourField on the form.
  9.     Else
  10.         'Do nothing
  11.     End If
  12.  
  13. End Sub
  14.  
Jul 2 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.