Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
166 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
[X]
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
  • 6
  • 4
10 Comments
 
LVL 58
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 58
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

688 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