If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#DELETED ???
I have a form that accepts data form users. I wan to delete any data that are
blanks. I put this on th "on load event of the form" Dim stDocName As String stDocName = "DeleteIt" DoCmd.SetWarnings False DoCmd.OpenQuery stDocName, acViewNormal DoCmd.SetWarnings True It run a query that deletes blank record in the table. Only problem I have is that when the form comes up, all the fields display: "#DELETED" If I check the table, no such entry exist and then when I run the form again, it's gone. What happening? |
#2
|
|||
|
|||
The form needs to be requeried. Try adding:
DoCmd.Requery at the end. This will refresh the underlying recordset for the form. -- --Roger Carlson Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "bladelock" wrote in message ... I have a form that accepts data form users. I wan to delete any data that are blanks. I put this on th "on load event of the form" Dim stDocName As String stDocName = "DeleteIt" DoCmd.SetWarnings False DoCmd.OpenQuery stDocName, acViewNormal DoCmd.SetWarnings True It run a query that deletes blank record in the table. Only problem I have is that when the form comes up, all the fields display: "#DELETED" If I check the table, no such entry exist and then when I run the form again, it's gone. What happening? |
#3
|
|||
|
|||
Hi.
It run a query that deletes blank record in the table. Only problem I have is that when the form comes up, all the fields display: "#DELETED" When a bound form is opened, it retrieves the Recordset from the database. That Recordset remains intact until the form is either requeried or closed. If a record in the original Recordset is deleted, the reference to that record is still "remembered" even though the data is gone. Cursoring (scrolling) through the records in this Recordset will reveal the #DELETED# symbol in each field of each deleted record. To avoid this, requery the form after deleting the records. The new Recordset retrieved from the database will not include any of these deleted records, since they no longer exist. HTH. Gunny See http://www.QBuilt.com for all your database needs. See http://www.Access.QBuilt.com for Microsoft Access tips. (Please remove ZERO_SPAM from my reply E-mail address so that a message will be forwarded to me.) - - - If my answer has helped you, please sign in and answer yes to the question "Did this post answer your question?" at the bottom of the message, which adds your question and the answers to the database of answers. Remember that questions answered the quickest are often from those who have a history of rewarding the contributors who have taken the time to answer questions correctly. "bladelock" wrote: I have a form that accepts data form users. I wan to delete any data that are blanks. I put this on th "on load event of the form" Dim stDocName As String stDocName = "DeleteIt" DoCmd.SetWarnings False DoCmd.OpenQuery stDocName, acViewNormal DoCmd.SetWarnings True It run a query that deletes blank record in the table. Only problem I have is that when the form comes up, all the fields display: "#DELETED" If I check the table, no such entry exist and then when I run the form again, it's gone. What happening? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Recovering deleted E-mail Outlook 2003 | Tim | General Discussion | 6 | February 9th, 2005 10:25 PM |
recover deleted mail items | Dirty Harrhy | General Discussion | 6 | February 8th, 2005 07:09 PM |
Empty deleted items bug? | gui | General Discussion | 0 | September 14th, 2004 07:38 AM |
Sending deleted messages to the deleted message folder | CASE1212 | General Discussion | 3 | September 10th, 2004 01:00 AM |
Emails incorrectly delivered into Deleted Items! (Worrying!) | Spamfree! | Outlook Express | 7 | September 4th, 2004 02:32 AM |