speedosteve
New member
- Local time
- Today, 05:15
- Joined
- Mar 15, 2004
- Messages
- 4
I'm working on a database for a bowling tournament.
For each event, I've code written that calculates totals, ranks them in order of place, divides up and assigns prize money, then pulls all of this into a neat little package.
Trouble is I dump some of the information into temporary tables during the process. For example, the score totals are held in tbl01 until the prize money is finished calculating.
If an error occurs and the temporary table tbl01 is still there, I get an error that tells me the table already exists and won't let me run the code. What I'm looking for is code (if any) to see if the process can pick up any temporary tables that are present and delete them when the error code kicks in to prevent messages like this. To summarize:
Err_SinglesEvent:
if tbl01 exists, then
delete it (docmd.deleteobject actable, "tbl01")
end if
Any suggestions on code that would help me if the table exists already?
Any help would be appreciated.
Thanks.
For each event, I've code written that calculates totals, ranks them in order of place, divides up and assigns prize money, then pulls all of this into a neat little package.
Trouble is I dump some of the information into temporary tables during the process. For example, the score totals are held in tbl01 until the prize money is finished calculating.
If an error occurs and the temporary table tbl01 is still there, I get an error that tells me the table already exists and won't let me run the code. What I'm looking for is code (if any) to see if the process can pick up any temporary tables that are present and delete them when the error code kicks in to prevent messages like this. To summarize:
Err_SinglesEvent:
if tbl01 exists, then
delete it (docmd.deleteobject actable, "tbl01")
end if
Any suggestions on code that would help me if the table exists already?
Any help would be appreciated.
Thanks.