robinski
asked on
Runtime Error 2001
I have made some changes to a database that has been running for five years. It includes a combo box to find member's entries.
I have given myself the error message:
"" Runtime error 2001
You cancelled the previous operation ""
I have not made changes to the combobox so I am perlexed as to where I should look for my error.
Code is below.
Thanks,
Robin
Private Sub MemberList_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Naim] = '" & Me![MemberList] & "'"
'This next line is selected on error 2001
Me.Bookmark = rs.Bookmark
DoCmd.GoToControl "Surname"
End Sub
ASKER
Thanks Andrew,
This error happens without any changes to data.
For instance, open application, select John Smith, John Smith record appears. Then select Fred Brown error message appears.
I am still a beginner and i do not understand where to put me.dirty
Thanks,
Robin
This error happens without any changes to data.
For instance, open application, select John Smith, John Smith record appears. Then select Fred Brown error message appears.
I am still a beginner and i do not understand where to put me.dirty
Thanks,
Robin
Hi Robin,
I suspect something is wrong with the .mdb itself.
Did you try a compact/repair and/or a decompile?
(http://www.granite.ab.ca/access/decompile.htm)
Or the jetcomp: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q273956
If that doesn't help, drop the .mdb in my mail and I'll have a look.
Nic;o)
I suspect something is wrong with the .mdb itself.
Did you try a compact/repair and/or a decompile?
(http://www.granite.ab.ca/access/decompile.htm)
Or the jetcomp: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q273956
If that doesn't help, drop the .mdb in my mail and I'll have a look.
Nic;o)
Robin, turn on the record selector of you form so that when you run the MemberList_AfterUpdate you can see if the recordselector has an arrow head or a pencil, if it is a pencil then something is changing the data in the current form, could MemberList be bound to a field?
Cheers, Andrew
Cheers, Andrew
ASKER
Andrew,
MemberList is unbound. I am a real amateur. How do I turn on the record selector?
Thanks,
Robin
MemberList is unbound. I am a real amateur. How do I turn on the record selector?
Thanks,
Robin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the five star service.
Cheers, Andrew