B
bob
I have the following code. I can not get a value for
recnbr. I have tried absoluteposition and bookmark.
Neither work for me.
Public Function passfind(strname As Variant, strwhat As
Variant, strwhere As Variant)
Dim recnbr As Integer
Set rst = CurrentDb.OpenRecordset(strname)
rst.Index = strwhere
rst.Seek "=", strwhat
If rst.NoMatch Then
msgbox ("Did not work")
Else
'recnbr = the row that the recordset is at
DoCmd.Close acForm, "whatwhere", acSaveNo
DoCmd.GoToRecord acDataForm, strname, acGoTo, recnbr
End If
End Function
recnbr. I have tried absoluteposition and bookmark.
Neither work for me.
Public Function passfind(strname As Variant, strwhat As
Variant, strwhere As Variant)
Dim recnbr As Integer
Set rst = CurrentDb.OpenRecordset(strname)
rst.Index = strwhere
rst.Seek "=", strwhat
If rst.NoMatch Then
msgbox ("Did not work")
Else
'recnbr = the row that the recordset is at
DoCmd.Close acForm, "whatwhere", acSaveNo
DoCmd.GoToRecord acDataForm, strname, acGoTo, recnbr
End If
End Function