This should be an easy one. This form is filtered by [Dismissed] = "N". When the user clicks the "Dismiss" button, the [Dismissed] field changes to "Y". After the requery, the form should then return to the same row where the user was previously at.
Private Sub DismissButton_Click()
Me!Dismissed = "Y"
MsgBox "Dismissed!", vbOKOnly
Dim GoBackToThisRecord As Integer
GobacktothisRecord = Me.CurrentRecord
Me.Requery
Set Me.CurrentRecord=GoBackToThisRecord
End Sub
However, even though the built-in help files say that CurrentRecord is a read/write property, I get an "Invalid use of property" error message on this last line.
After setting the [Dismiss]="Y", and requerying the form, how do I get the user back to his/her previous location in the form?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…