Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access Subform - The Form is set to cycle all records and it stops at the last field of the record

Posted on 2015-01-29
10
150 Views
Last Modified: 2015-02-04
I have a subform that I have setup to capture data about an order.  It tabs through all of the fields to the last field and then it does not move on to the next record.  The only way to get out of the record is to press ESC.

I would like it to move to the first field of the next record.

Ont eh Form Properties I have the Cycle set to All records.

Please help.
0
Comment
Question by:btgtech
  • 6
  • 4
10 Comments
 
LVL 57
ID: 40577840
Are you changing the record (it may not be passing some validation some where)?

Is this within a form that has a main/subform combination?

Jim.
0
 
LVL 57
ID: 40577842
Scratch the last; just saw the title of the question!

Understand that it will only cycle within the subform...it's not going to jump out back to the main form (Ctrl/Tab will).

Jim.
0
 

Author Comment

by:btgtech
ID: 40577847
I do not want it to cycle to the main form, I am looking for it to cycle to the next record.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:btgtech
ID: 40577861
I have an Event that happens in the After Update Event of the form.  I removed that and it cycle thru as expected to the next record.

What I am trying to do is that we have the user entering plan hours and dates on the subform.  Once they have entered the data, then I set the revised hours and dates to equal the plan data as a starting point for the next form so that they only make updates to the revised data on the next form.

1. Should I add an after update event on each of the fields to do this rather than once at the form level?
2. Is there a better event to place this code in?

Thanks
0
 
LVL 57
ID: 40577862
<<Ont eh Form Properties I have the Cycle set to All records.>>

 Just to double check, it's the subforms cycle property you've set, correct?

If so, then I would look for code that:

1. Stops the record from being saved (BeforeUpdate of the form is being canceled).

2. You don't have any special code trying to control the tabbing order within the subform.

If neither of those is a possibility, bounce back.

Jim.
0
 
LVL 57
ID: 40577866
<<What I am trying to do is that we have the user entering plan hours and dates on the subform.  Once they have entered the data, then I set the revised hours and dates to equal the plan data as a starting point for the next form so that they only make updates to the revised data on the next form.>>

 Not sure I'm following that....can you post the code from the AfterUpdate please.

Jim.
0
 

Author Comment

by:btgtech
ID: 40577881
Private Sub Form_AfterUpdate()
'   Me.RevisedCutSawStart = Me.[20START]
'   Me.RevisedCutSawComplete = Me.[20COMP]
'   Me.RevisedBrakeStart = Me.[22START]
'   Me.RevisedBrakeComplete = Me.[22COMP]
'   Me.RevisedPlasmaStart = Me.[24START]
'   Me.RevisedPlasmaComplete = Me.[24COMP]
'   Me.RevisedWeldStart = Me.[30START]
'   Me.RevisedWeldComplete = Me.[30COMP]
'   Me.RevisedCleanStart = Me.[40START]
'   Me.RevisedCleanComplete = Me.[40COMP]
'   Me.RevisedPaintStart = Me.[45START]
'   Me.RevisedPaintComplete = Me.[45COMP]
'   Me.RevisedAssemblyStart = Me.[50Start]
'   Me.RevisedAssemblyComplete = Me.[50COMP]
'   Me.RevisedCutSawHours = Me.PlanCutSawHours
'   Me.RevisedBrakeHours = Me.PlanBrakeHours
'   Me.RevisedPlasmaHours = Me.PlanPlasmaHours
'   Me.RevisedCleanHours = Me.PlanCleanHours
'   Me.RevisedWeldHours = Me.PlanWeldHours
'   Me.RevisedPaintHours = Me.PlanPaintHours
'   Me.RevisedAssemblyHours = Me.PlanAssemblyHours
   
End Sub
0
 
LVL 57
ID: 40577897
So your trying to carry values forward to the next record, or are you updating the Revisedxxxx fields in the current record?

Jim.
0
 

Author Comment

by:btgtech
ID: 40577935
Revised fields in the current record
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 40578023
<<Revised fields in the current record >>

 You want the code in the BeforeUpdate event.  In AfterUpdate, the that's too late...the records is already saved.

Jim.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question