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
143 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now