MsgBox statement changes results
Posted on 2005-03-18
I have a Form with a subform. The subform is a continuous form. Upon clicking the subform area, I highlight the selected row. When a Sort option is selected, I want to keep the current line highlighted. To accomplish this I use the following code: (Access 2002 'adp' SQL Server)
Me.Form.InputParameters = "@XSortOrder nvarchar = '" & XSQLOrder & "'"
MsgBox strSave & " Before FIND"
Me.Form.Recordset.Find "[EmpKey] = '" & strSave & "'"
If I leave the MsgBox line in the code, it works. If I remove the line, it defaults to the 1st row displayed in the subform.
Why would the MsgBox change the results?