Error 3167 Vba
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring error 3167 solution developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question runtime error 3167 record is deleted access 2007 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them;
Access Record Is Deleted Error
it only takes a minute: Sign up “Run time error 3167: Record is deleted” when unchecking a selection in multi select listbox up vote 0 down vote favorite I have a form that contains a multi-select list box, a
Aldelo Error 3167
user can check off as many selections as required, then hit the "save" button, which saves the form fields, and the checked off selections in their respective tables. Everything works perfectly fine, until a user unchecks a selection that had previously been saved. I have tried several things, including refreshing the form, and the recordset, to no avail. While testing to find a solution, I commented out every single line of VBA code tied to the form's save button. record is deleted access 2013 When clicking this button, obviously nothing happens with the code commented out, but if I try and close the form with the window's "x" button, I then get a message box stating "Record has been deleted" I have no idea where to look at this point, I've tried to compact and repair database, also with negative results. I have no code to post, as it doesn't matter what code I try to run, I get the error, a completely empty sub still gives me the error. Again, this only happens when a user unchecks a selection that previously had been checked off. Here is a screen shot of the form: The list box in red is the culprit. A user can edit every single field on the form and it all works fine, a user can even "add" selections from the listbox by checking items off, and it will save them, and show them the next time the record is viewed. The problem occurs when a user unchecks one of the selections that were previously checked off. Details of the listbox: It is a multi select list box populated by a "lookup" that was created with the listbox wizard The values selected are saved in a field as a comma separated list The field itself is a lookup of another table, that allows multiple values At this point I'm not even sure I'm explaining myself properly,
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/27511982/run-time-error-3167-record-is-deleted-when-unchecking-a-selection-in-multi-se Run-time error 3167 and Run-time error 3012 up vote 0 down vote favorite I have a question regarding the code below which creates a new query based on combobox selections or a textbox entry on an Access form. Sometimes when I run the query it works fine and other times I get one of two errors. I think it has to do with http://stackoverflow.com/questions/33627835/run-time-error-3167-and-run-time-error-3012 either the code that creates the "sqlquery" query itself the deletion of the "NewQuery" after its created or a combination of both. Any assistance you can provide would be greatly appreciated. I have been trying a variety of different solutions for hours, but I am coming up short. The first error I receive is Run-time error 3167 Record is deleted on the line DoCmd.OpenQuery "NewQuery". The next error I receive on other occasions is Run-time error 3012 Object "NewQuery" already exists on the line Set qdf = CurrentDb.CreateQueryDef("NewQuery",sqlquery). Thank you. On Error Resume Next CurrentDb.QueryDefs.Delete "NewQuery" If Text24 <> "" Then sqlquery = "SELECT * FROM TABLE WHERE TABLE.WorkerID = [Forms]![UserForm]![Text24];" Else ComboBox_condition = "" If ComboBox0 <> "" Then ComboBox_condition = ComboBox_condition + " TABLE.PayGroupRegionCode = '" & ComboBox0 & "'" End If If ComboBox0 <> "" And ComboBox4 <> "" Then ComboBox_condition = ComboBox_condition + " TABLE.PayGroupCountryDesc = '" & ComboBox4 & "'" ElseIf ComboBox4 <> "" Then ComboBox_condition = ComboBox_condition + " AND TABLE.PayGroupCountryDesc = '" & ComboBox4 & "'" End If If ComboBox0 <> "" And ComboBox4 <> "" And ComboBox6 <> "" The
Post your question and get tips & solutions from a community of 418,509 IT Pros & Developers. It's quick & easy. Error 3167 Record is Deleted ** P: n/a david720 Error 3167 Record is deleted And Sometimes the main https://bytes.com/topic/access/answers/770787-error-3167-record-deleted entry form displays a record in the form where all fields are "#Delete" Why do we get this error sometimes (about 2 times a week)? It happens from different users and on different workstations. Also in this application no records are ever deleted and would be difficult for a user to delete a record Environment: Access 2003 (converted from Access 97) XP workstations, jet 4 with SP 2 Split into Front and Back end, both mdb's Large databases, FE, 39m, BE, error 3167 140m The main table has a large record length but the system functioned find in ver 97 Thanks for any responses! Feb 14 '08 #1 Post Reply Share this Question 2 Replies P: n/a Bob Alston da******@verizon.net wrote: Error 3167 Record is deleted And Sometimes the main entry form displays a record in the form where all fields are "#Delete" Why do we get this error sometimes (about 2 times a week)? It happens from different users and on different workstations. record is deleted Also in this application no records are ever deleted and would be difficult for a user to delete a record Environment: Access 2003 (converted from Access 97) XP workstations, jet 4 with SP 2 Split into Front and Back end, both mdb's Large databases, FE, 39m, BE, 140m The main table has a large record length but the system functioned find in ver 97 Thanks for any responses! The form characteristics you describe seems to be that a record initially displayed has been deleted. I seem to recall having seen that previously. I personally have seen error 3167 due to corruption in a replicated database. Try to import all the existing back end tables into a new database. If it works with out error, you do not have corruption, at least the same kind of thing I experienced. As I recall, the speculation about my 3167 error was that the external pointer to a memo field was corrupt. maybe this will help point you in the right direction. HTH Bob Feb 14 '08 #2 P: n/a Tony Toews [MVP] da******@verizon.net wrote: >Error 3167 Record is deleted You get that as a message? Then, as Bob states, that's a sign of corruption. You might only have a record, or as Bab points out, a corrupt memo field. See the Locating damage via code section at the following page. "A method to locate minor corruption, especially in memo fields is to write