We help IT Professionals succeed at work.
Get Started

MS Access 2007 - Main and SubForm - Return to current record

515 Views
Last Modified: 2013-11-27
I have a mian and subform where I display on the main form a violation level valie in a field. This violation value is calculated from an event on the sub form. The subform can have many records so the calculation is recalculating all the values in these rows.
The event on the sub form is on the after update of a drop down box. The user selects a value from the subform dropdown box and it is updated and displayed in the main form. The code initiated from the after update of the drop down box on the subform is:
Private Sub Violation_Level_AfterUpdate()
If Me.Violation_Level = "3-Severe" Then
     Me.ViolationPoints = 3
     Me.Parent.Recalc
  End If
End Sub

Because of the code line  Me.Parent.Recalc, the screen is recalculated and the subform also recalc and it then displays the first record in the subform list which is usually not the record the user was working on.

Question: I need some ideas on how to return the user to the record they were originally working on before the code was run to recalc the value.

Any Assistance would be appreciated
LAD

Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE