Results 1 to 8 of 8
  1. #1
    jim35meyers is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    6

    I can "find record" but I cannot edit it without getting an error

    I used the Combo Box wizard to find a specific record, and it seems to be working except that when I then try to edit that record and move to the next, it gives me an error saying "Update or CancelUpdate without AddNew or Edit."

    We have client IDs, and I am trying to make a box so I can search by client ID and then when their record pops up I can edit it.



    thank you for any help

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    if the form allows edits, it should work.
    if the the query allows it, it should work, UNLESS your query has joins that prevent edits.

  3. #3
    jim35meyers is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    6
    Thank you for the response. the form allows edits. do I need to specify that it allows edits in the code? Before I add that combo box I can go from record to record and edit them just fine. When I add the combo box with the wizard it then gives me that error.

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I don't use wizards so I cannot tell what your combobox is doing, but obviously it is causing the problem. Instead, use the combobox as a way for the user to select a value, then filter the form based on that value. You can do that with a macro or with VBA. That takes control away from the wizard and puts it back into your hands.

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    IF you select the Combobox and go to Properties - Data and look at the Control Source is it blank...or does it have a Field name in it? Comboboxes used for this purpose have to be Unbound, i.e. their Control Sources are empty, or you're actually changing a Field in the current Record when you make a selection from the Combobox.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    jim35meyers is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    6
    Quote Originally Posted by Missinglinq View Post
    IF you select the Combobox and go to Properties - Data and look at the Control Source is it blank...or does it have a Field name in it? Comboboxes used for this purpose have to be Unbound, i.e. their Control Sources are empty, or you're actually changing a Field in the current Record when you make a selection from the Combobox.

    Linq ;0)>

    Thank you, but the box is unbound. It does not have a control source. The weird thing is that it lets me update records through the form just fine, unless I do a SearchForRecord (either using the wizard or just doing it manually). Once a record is brought up on the form, how can I edit it without getting this error?

    Thank you

  7. #7
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    The error message suggests that you have an error in some VBA code in the form. Do you have any code that is attempting to update a recordset? Look for something like .Update (including the leading period).

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by jim35meyers View Post

    ...the form allows edits...
    Are you basing this statement on the fact that AllowEdits is set to Yes or have you actually tried and succeeded in editing a Record on the Form?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-10-2015, 06:33 AM
  2. Replies: 5
    Last Post: 11-19-2014, 08:47 AM
  3. Replies: 13
    Last Post: 01-11-2012, 09:44 PM
  4. Replies: 1
    Last Post: 09-11-2010, 08:21 AM
  5. Creating "Edit Record" link in table column
    By joshearl in forum Forms
    Replies: 1
    Last Post: 12-25-2009, 11:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums