XLEAccessGuru
XLEGuru
- Local time
- Today, 16:17
- Joined
- Nov 17, 2006
- Messages
- 65
I have code behind a form that looks for missing data. When it finds missing data in the recordset, it finds the record on the form that matches the record ID in the recordset. It has worked fine until now. Nothing has really changed but all of a sudden I'm getting error # 2137 "You can't use find or replace now."
What is perplexing is that I'm not using find/replace to begin with - i'm using the 'findrecord' method. Secondly, this same code has worked perfectly until now.
Here is where it's erroring out. The variable "ProfileRecordID" is set prior to these lines of code and is set on the current record in the open recordset. The error occurs on "DoCmd.FindRecord iProfileID, , , , True".
Any and all ideas welcome and appreciated!
What is perplexing is that I'm not using find/replace to begin with - i'm using the 'findrecord' method. Secondly, this same code has worked perfectly until now.
Here is where it's erroring out. The variable "ProfileRecordID" is set prior to these lines of code and is set on the current record in the open recordset. The error occurs on "DoCmd.FindRecord iProfileID, , , , True".
Code:
If IsNull(rec("Financial Class")) Then
MsgBox "'Financial Class' " & msg, vbExclamation, VAL_ERR_MSG
rec.Close
DoCmd.FindRecord iProfileID, , , , True 'find record that needs to be corrected
DoCmd.GoToControl ("cboFinClass") 'go to field that needs to be corrected
Me.cboFinClass.Dropdown
Exit Sub
Any and all ideas welcome and appreciated!