By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,708 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

Error with a searh combox

P: 4
Hi,

I'm doing a search combox to pop up and specific record. Everything is working fine until I make a change to the record that I'm working on and try to move to other record. A error message appear that said " Update or CancelUpdate without Addnew or Edit". I think that I need to add a message box that ask you if you want to save the record or not, but I don't know how to do it because I'm new in Access. Here is the code that I'm using for the combox that search for the record:
Expand|Select|Wrap|Line Numbers
  1.  Private Sub Combo177_AfterUpdate()
  2.  'Find the record that matches the control.
  3. Dim rs As Object
  4. Set rs = Me.Recordset.Clone
  5. rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo177], 0)) & ""
  6. If Not rs.EOF Then
  7.    Me.Bookmark = rs.Bookmark
  8.    End If
  9. End Sub 
Jun 26 '07 #1
Share this Question
Share on Google+
1 Reply


hyperpau
Expert 100+
P: 184
Hi,

I'm doing a search combox to pop up and specific record. Everything is working fine until I make a change to the record that I'm working on and try to move to other record. A error message appear that said " Update or CancelUpdate without Addnew or Edit". I think that I need to add a message box that ask you if you want to save the record or not, but I don't know how to do it because I'm new in Access. Here is the code that I'm using for the combox that search for the record:
Expand|Select|Wrap|Line Numbers
  1.  Private Sub Combo177_AfterUpdate()
  2.  'Find the record that matches the control.
  3. Dim rs As Object
  4. Set rs = Me.Recordset.Clone
  5. rs.FindFirst "[ContactID] = " & Str(Nz(Me![Combo177], 0)) & ""
  6. If Not rs.EOF Then
  7.    Me.Bookmark = rs.Bookmark
  8.    End If
  9. End Sub 
I think you really cannot make changes to that because you trying to edit a recordset clone therefore the allow edits are set to false.
Jun 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.