Hello there, I need some help from the experts around here..



Am trying to build a VBA Code (already tried Macro and failed), that will remove the filter, and go to the current record (the one am already focused on).

As we cannot use a variable in the offset in GoToRecord, I thought of making a loop to do this (I've never used VBA before, so am using my Java knoweldge to try build this up).

Here's what i got, but it's not working, i get an Offer Details is not open (although it is).

Private Sub Command314_Click()
Dim startVar As String
Dim wantVar As String
tempVar = Me.CurrentRecord
startVar = 1
DoCmd.ShowAllRecords
While (tempVar <> startVar)
startVar = startVar + 1
DoCmd.GoToRecord acDataForm, "Offer Details", acNext
Wend
End Sub

Thanks alot for the help