PC Review


Reply
Thread Tools Rate Thread

How do I tab from subform to subform?

 
 
Stapes
Guest
Posts: n/a
 
      9th Jan 2008
Hi

I have a form Order Form, with subforms Customer Details and Order
Details. When the user uses the tab key, after the last field in
Customer Details, it goes on to the next customer details record. What
I want it to do is to go to the first field in the Order Details
section.
How can this be achieved?

Stapes
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      9th Jan 2008
On Wed, 9 Jan 2008 07:02:39 -0800 (PST), Stapes <(E-Mail Removed)>
wrote:

>Hi
>
>I have a form Order Form, with subforms Customer Details and Order
>Details. When the user uses the tab key, after the last field in
>Customer Details, it goes on to the next customer details record. What
>I want it to do is to go to the first field in the Order Details
>section.
>How can this be achieved?
>
>Stapes


The assumption is that you will be entering more than one record in the
subform. If that's not the case (or usually not the case), you can put an
additional textbox named txtRelay on the Customer Details subform. Make it
unbound, and last in the tab order; it must have its Visible property set to
true for it to get the focus, but you can make it tiny and/or hide it behind
some other control to avoid mouseclicking into it.

In its GotFocus event put code like

Private Sub txtRelay_GotFocus()
Parent!subOrderDetails.SetFocus
Parent!subOrderDetails.Form!controlname.SetFocus
End Sub

where subOrderDetails is the name of the Subform Control containing the Order
Details form object, and controlname is the name of the control on that form
which should first get the focus.

John W. Vinson [MVP]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disconnect subform requery, or scroll a subform to a specific record more cleanly? Max Moor Microsoft Access Form Coding 0 2nd Jun 2007 02:17 AM
subform combo to filter based on other subform...technically mainform's other subform records. nospam@thankyou.com Microsoft Access 0 15th Sep 2006 07:51 PM
Referencing control in subform from subform's subform Kat Microsoft Access VBA Modules 5 19th Jun 2006 04:03 PM
Wierd subform behaviour, subform not cycling through after updating a subform record Mikal Microsoft Access Forms 2 25th May 2006 07:15 PM
Urgent !!! - Values from Subform - #Error if no records in Subform and Only grabs first subform record Greg Microsoft Access Forms 0 17th Feb 2005 01:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:26 PM.