A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#DELETED ???



 
 
Thread Tools Display Modes
  #1  
Old September 1st, 2005, 08:51 PM
bladelock
external usenet poster
 
Posts: n/a
Default #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  
Old September 1st, 2005, 09:07 PM
Roger Carlson
external usenet poster
 
Posts: n/a
Default

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  
Old September 1st, 2005, 09:18 PM
'69 Camaro
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 10:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.