Error 3167 Record Is Deleted
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 microsoft visual basic runtime error 3167 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges record is deleted error 3167 access Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each
Runtime Error 3167 Record Is Deleted Access 2007
other. Join them; it only takes a minute: Sign up Record Is Deleted message in Microsoft Access VBA up vote 1 down vote favorite In a Microsoft Access Application I'm modifying, certain vba functions return the message: "Record is
Error 3167 Siap
Deleted" This appears in a message box with no error number and a yellow caution icon. This is not a error that can be trapped by traditional error handling ("on error...". It is also not affected by DoCmd.setwarnings=false I'm looking for some advice on how to trap or handle this item. ms-access access-vba share|improve this question asked Aug 7 '13 at 0:38 user1737050 2319 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote access record is deleted error "Record is deleted" is run-time error 3167 and it can be trapped using normal On Error handling. This can be verified via VBA code like the following: Sub foo() Dim cdb As DAO.Database, rst As DAO.Recordset Set cdb = CurrentDb Set rst = cdb.OpenRecordset("SELECT * FROM Table1 WHERE ID=26", dbOpenDynaset) MsgBox "Waiting..." On Error GoTo foo_Error Debug.Print rst!ID On Error GoTo 0 rst.Close Set rst = Nothing Set cdb = Nothing Exit Sub foo_Error: MsgBox "Error " & Err.Number & ": " & Err.Description, vbOKOnly, "Trapped Error" End Sub If you run that code and then "delete the record out from under it" while the MsgBox is displayed then the rst! reference in the Debug.Print triggers the run-time error 3167 and the On Error catches it. Check your code to see if there is an active On Error (possibly declared in an earlier calling procedure) that simply displays a plain MsgBox with the Err.Description. That would explain the behaviour you describe. share|improve this answer answered Aug 7 '13 at 1:26 Gord Thompson 56.1k74794 add a comment| up vote 0 down vote Maybe you pull a record to delete from multiple tables... such as sql = "SELECT columnA FROM tableA WHERE criteria" set rec = currentdb.openrecordset(sql) DoCmd.SetWarnings False DoCmd.RunSQL "DELETE FROM tableA WHERE columnA = " & rec(0) DoCmd.RunSQL "DELETE FROM tableB WHERE columnB = " & rec(0) DoCmd.RunSQL "DELETE FROM tab
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
Aldelo Error 3167
Us Learn more about Stack Overflow the company Business Learn more about hiring record is deleted access 2013 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 Record is deleted error after executing http://stackoverflow.com/questions/18092805/record-is-deleted-message-in-microsoft-access-vba vb code (that deletes the record) up vote 2 down vote favorite 2 I have a problem with one of my databases that I have had for some time that is somewhat of an annoyance. I have a form in continuous view in which the user must fill out some information for each record and then click a "commit" button (for each record). Based on the http://stackoverflow.com/questions/13053845/record-is-deleted-error-after-executing-vb-code-that-deletes-the-record values entered for that record, the "commit" button will first insert the information in one of two tables, then delete the record from the temporary table from which the form is querying. psuedocode for it is here: IF x.checked && y > 70 then db.execute "Insert into tblCompleted values (me.empID,'completed',me.y); else db.execute "insert into tblIncompleted values (me.empid, 'incomplete', 'me.y); end if db.execute "delete * from tblTemporary WHERE empid = me.empID" 'form.requery 'form.refresh I will sometimes get a 'record is deleted' runtime error, sometimes twice for the same record. However, all operations do work. After it has been completed, however, the record shows ##DELETED. To fix this, I put a Form.refresh and Form.requery statement at the end of my code. This will eliminate the ##DELETED record, but often throw me a "record is deleted" error. Before you say "why are you using two tables, couldn't this just be modeled with one table", this is a simplified version of what I'm actually doing, and to me, using two tables makes more sense design-wise. My main concern is this run time error. I could just catch it and leave it unhandled, but I'd prefer actually fixing it and sorting
Post your question and get tips & solutions from a community of 418,509 IT Pros & Developers. It's quick https://bytes.com/topic/access/answers/770787-error-3167-record-deleted & easy. Error 3167 Record is Deleted ** P: n/a david720 Error 3167 https://bytes.com/topic/access/answers/890734-error-3167-record-deleted 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. Also in this application no records are ever error 3167 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! Feb record is deleted 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. 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,
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 100+ P: 107 doma23 Hi, I implemented Front End / Back End on my database. Both files are on the common disk (server) in the same folder. My colleague and me were doing some multiuser testing and when we seleceted some periods this error pops up. I.e. - we have two combo boxes, current period and previous period. Periods are like F10,F09,H10,H09,1Q10,2Q09,3Q09 and so on, meaning full year, half year, quarter etc. After some more testing, we discovered that 3167 error pops up only when one of the users select current period 1H10 and previous period 1H09. And when we go to debug querydef row is highlighted. When we select all other periods this doesn't happen. Also, maybe it's important to know that the period table from which we are extracting periods in the first place is linked to the FE from the BE data file. Of course when we copy FE on our desktops and when we both use different copies of FE everything seems to work. So this also only happens when we run the same FE file at the same time. And to me, it kind of a seems logical that there will be conflicts, probably memory allocation or something, but I can't explain exactly what is causing the error. I hope I was clear enough. Thank you! Jun 29 '10 #1 Post Reply Share this Question 3 Replies Expert Mod 15k+ P: 29,922 NeoPa Can you go to Tools / Options / Advanced and post what locking settings you have. It's important these are set correctly. Not only on one PC but all of them. Jun 29 '10 #2 reply 100+ P: 107 doma23 Hi mate, the settings were set to "not blocked", after which we've tried the other two and the problem was solved with partially locked record. However some other problems appeared soon after (qdef and duplicate tables), so my boss decided to just use FE/BE with the FE on the desktop of each computer, not on the server. I'm little bit afraid that the same problem might occur even with this type of structure, as in my opinion we didn't test enough, but the time will tell. We didn't continue to test and investigate further, and now we're on