Error: Update or Cancel Update without Add or Edit

emreut

Registered User.
Local time
Today, 05:16
Joined
Aug 22, 2000
Messages
14
I am using two text boxes that gets their values from another form. And using a code to make the table go to a specific record depending on those values on those two tex boxes. The form opens without any problem on the record that I want it to be. I need to add some information to other fields on that record. When I edit a value of a control by a combo box or a text box, as soon as I move on to another control, it gives me the error on the topic. I've set allow edits property of the form to yes. It should be fine. I think the code that makes the form move to the specific record causes the problem. Here is the code:

Private Sub Form_Timer()
'Find the record that matches the control.
Dim rs As Object

Set rs = Me.RecordSet.Clone

rs.FindFirst "[Operasyon No] = " & str(Me![OperasyonNoCombo])
Me.Bookmark = rs.Bookmark
End Sub

Please help me out, I'm stuck!
frown.gif
 
I am now positive that the error is caused by the code. There is no such problem when I don't run the code. In addition though I found out that the code is not working properly.
I need it to find the firs record depending on the values from two controls, not only one. I tried to add another arguement by using AND but could not get it working. I need it to look for [Operasyon No] field from [OperasyonNoCombo] and [Is Emri No] field from [IsEmriNoCombo] simultaneously.

How do I do that?

Thanks in advance...
 

Users who are viewing this thread

Back
Top Bottom