D
David Gartrell
14th May???? Oops sorry - date wrong on my PC!
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
David Gartrell said:14th May???? Oops sorry - date wrong on my PC!
Gunnar Nygaard said:Hi David
I assume you delete the table and then re-generate it?
What you could do is to delete it without checking, and simply ignore or
trap the errors that may arise.
'*****************
'Ignore possible errors
On Error Resume Next
'Delete the thing, no matter what (In my case a query)
DoCmd.DeleteObject acQuery, QUERY_NAME_TO_UPDATE
'Assume normal error handling
On Error GoTo Err_LagreSporring5
'Run your code to re-generate the object
'*****************
Hth
Rgds
Gunnar Nygaard
Hi Gunnar,
SusanV said:Hi David,
I have a similar situation with a temp table (tblTemp), this is the code I
use:
If Not IsNull(DLookup("Name", "MSysObjects", "[Name] = 'tblTemp'"))
Then
DoCmd.DeleteObject acTable, "tblTemp"
End If
--
hth,
SusanV
David Gartrell said:14th May???? Oops sorry - date wrong on my PC!
David Gartrell said:Thanks very much for your help.
SusanV said:Hi David,
I have a similar situation with a temp table (tblTemp), this is the code
I use:
If Not IsNull(DLookup("Name", "MSysObjects", "[Name] = 'tblTemp'"))
Then
DoCmd.DeleteObject acTable, "tblTemp"
End If
--
hth,
SusanV
David Gartrell said:14th May???? Oops sorry - date wrong on my PC!
message Hi there,
I wonder if someone could help me please. I have an Access 2000
database
which needs to create a temporary table and then later delete it again
(lets
call it 'tableA'). Is there a way (in VB) of checking whether the
table
exists before executing subsequent code. 99% of the time it will exist,
but
sometimes if there's a computer crash etc the table may be left behind
when
it should be deleted.
Any help would be greatly appreciated.
many thanks
David.
Err_LagreSporring5 is correctly just a name used in my particular snippet ofThanks for your help. I am a little puzzled though by the line 'On Error
GoTo Err_LagreSporring5'. I don't recognise the code after the GoTo
command. Is this something unique to your own situation?
Thanks
David
**********************[email protected]Hi there,
I wonder if someone could help me please. I have an Access 2000 database
which needs to create a temporary table and then later delete it again (lets
call it 'tableA'). Is there a way (in VB) of checking whether the table
exists before executing subsequent code. 99% of the time it will exist, but
sometimes if there's a computer crash etc the table may be left behind when
it should be deleted.
Any help would be greatly appreciated.
many thanks
David.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.