Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 12:59 AM
Tim Tabor
Guest
 
Posts: n/a
Default SQL DELETE and Me.Requery in Access

I would expect the following code to delete all the records in a form's
underlying recordset, and delete the rows in the form. But the form's rows
are still there, and when I scroll the form, the field's values display
'#Deleted'. Thank you for the help.

Dim strSQL As String
strSQL = "DELETE * FROM " & Me.Recordset.Name
CurrentDb().Execute strSQL
Me.Requery


  #2  
Old November 13th, 2005, 12:59 AM
Pieter Linden
Guest
 
Posts: n/a
Default Re: SQL DELETE and Me.Requery in Access

"Tim Tabor" <tltabor@nyc.rr.com> wrote in message news:<8phBc.83374$mX.28408744@twister.nyc.rr.com>. ..[color=blue]
> I would expect the following code to delete all the records in a form's
> underlying recordset, and delete the rows in the form. But the form's rows
> are still there, and when I scroll the form, the field's values display
> '#Deleted'. Thank you for the help.
>
> Dim strSQL As String
> strSQL = "DELETE * FROM " & Me.Recordset.Name
> CurrentDb().Execute strSQL
> Me.Requery[/color]

Add Me.Repaint after Me.Requery.
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles