[mso] Re: DoCmd.SetWarnings for Access 2000

  • From: "Green" <1z@xxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Wed, 10 Dec 2003 20:41:11 +0100

Hi Anthony,

On error resume next works fine. Thankyou.

Do you think this could be a version thing perhaps? I don't find any
reference to SetWarnings in the object browser at all.

Anyways... I have working code now so I'm relatively happy.

Thanks again

Regards
Lisa


> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
> Behalf Of Colli, Anthony G
> Sent: 10 December 2003 16:47
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Re: DoCmd.SetWarnings for Access 2000
>
>
>
>
>
> Lisa-
>
> sgSQL = "DROP TABLE tblTempDP;"
> On Error Resume Next
> DoCmd.RunSQL sgSQL
>
> Will likely work. On Error Resume Next will ignore any
> error that might
> occur in the code. It's not a good thing to use lightly
> because you will
> never know when your code is generating an error.
>
> You should check to see if the table exists before you try
> and drop the
> table. You can query MySysObjects to see if the table
> exists like this.
>
> SELECT MSysObjects.Name
> FROM MSysObjects
> WHERE (((MSysObjects.Name)="tblTempDP"));
>
> Then to delete the table you can use SQL or the ADOX
> library like this.
>
> -------------------------------------------
> Public Function DeleteTable()
> Dim cat As ADOX.Catalog
>
> Set cat = New ADOX.Catalog
> cat.ActiveConnection = CurrentProject.Connection
>
> On Error Resume Next
> cat.Tables.Delete "tblTempDP"
>
> cat.Tables.Refresh
>
> Set cat = Nothing
>
> End Function
> --------------------------------------------
>
> -Anthony
>

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: