Connecting Tech Pros Worldwide Forums | Help | Site Map

Getting rid of #DELETE on form with application.echo

Swann
Guest
 
Posts: n/a
#1: Nov 12 '05
Hello,
I have a form linked to a table with a button that deletes the
currently selected record with a VBA sub. When I perform the delete
query, the data in the fields are replaced with #DELETE, something I
would rather not occur. I would really prefer that the fields just
appear blank. Sifting through some of the messages on this newsgroup
has revealed that setting something called application.echo equal to
false will prevent this from occuring. However, none of my
experimentation with application.echo has worked.

Basically, this is what I have tried to do (bear in my I have really
have no idea what I'm doing):

private sub delete ()
dim db as dao.database
set db = dbcurrent

dim strSQL as string
string = "Delete query stuff."

application.echo "false"
db.execute(strSQL)
application.echo "true"

end sub


Thanks for your help!
Swann

Bradley
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Getting rid of #DELETE on form with application.echo


Swann wrote:[color=blue]
> Hello,
> I have a form linked to a table with a button that deletes the
> currently selected record with a VBA sub. When I perform the delete
> query, the data in the fields are replaced with #DELETE, something I
> would rather not occur. I would really prefer that the fields just
> appear blank. Sifting through some of the messages on this newsgroup
> has revealed that setting something called application.echo equal to
> false will prevent this from occuring. However, none of my
> experimentation with application.echo has worked.[/color]

Try requerying the recordset.
[color=blue]
> Basically, this is what I have tried to do (bear in my I have really
> have no idea what I'm doing):
>
> private sub delete ()
> dim db as dao.database
> set db = dbcurrent
>
> dim strSQL as string
> string = "Delete query stuff."
>
> application.echo "false"
> db.execute(strSQL)
> application.echo "true"
>
> end sub
>
>
> Thanks for your help!
> Swann[/color]

--
regards,

Bradley


Salad
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Getting rid of #DELETE on form with application.echo


Swann wrote:
[color=blue]
> Hello,
> I have a form linked to a table with a button that deletes the
> currently selected record with a VBA sub. When I perform the delete
> query, the data in the fields are replaced with #DELETE, something I
> would rather not occur. I would really prefer that the fields just
> appear blank. Sifting through some of the messages on this newsgroup
> has revealed that setting something called application.echo equal to
> false will prevent this from occuring. However, none of my
> experimentation with application.echo has worked.
>
> Basically, this is what I have tried to do (bear in my I have really
> have no idea what I'm doing):
>
> private sub delete ()
> dim db as dao.database
> set db = dbcurrent
>
> dim strSQL as string
> string = "Delete query stuff."
>
> application.echo "false"
> db.execute(strSQL)
> application.echo "true"
>
> end sub
>
>
> Thanks for your help!
> Swann[/color]

Have you considered using the OnDelete event instead?

Closed Thread


Similar Microsoft Access / VBA bytes