Running a Macro

P

PeterM

I have a macro built that copies an access database created from outlook
containing contacts. I need to copy the outlook table (Contacts) to my
system mdb in a table (Contacts).

The following macro stops executing if the destination table does not exist.

SetWarnings = OFF
DeleteTable = table, contacts
TransferDatabase, transfer type=import, etc....

Is there a way to force the macro to continue if there's a contact table or
not?
 
L

Larry Linson

PeterM said:
I have a macro built that copies an access database created from outlook
containing contacts. I need to copy the outlook table (Contacts) to my
system mdb in a table (Contacts).

The following macro stops executing if the destination table does not
exist.

SetWarnings = OFF
DeleteTable = table, contacts
TransferDatabase, transfer type=import, etc....

Is there a way to force the macro to continue if there's a contact table
or
not?

I don't have an answer, but there is a Microsoft-sponsored newsgroup
microsoft.public.access.macros, which the online user interface may obscure
by using a "friendly name". But, because that newsgroup deals specifically
with Access macros, it would be a better place to get a "macro answer" than
this one, which deals with general Access issues. Many of us who answer
questions here use VBA and rarely, if ever, use macros, but those who answer
questions in m.p.a.macros are "attuned" to macro topics.

Larry Linson
Microsoft Office Access MVP
 
D

Douglas J. Steele

What version of Access?

Prior to Access 2007, macros have no error handling ability, so you'd need
to add a condition that the table must exist.

In Access 2007, I believe you can specify that you should continue on error.
 
P

PeterM

Understood. Thanks for the information. I would really prefer to do it vba
as well. Can you point me somewhere I can get relavent info?

Thanks again.
 
L

Larry Linson

PeterM said:
Understood. Thanks for the information. I would really
prefer to do it vba as well. Can you point me somewhere
I can get relavent info?

Let's ask someone who works with both Access and Outlook to jump in here.

I don't use Outlook and don't have it installed, so can't experiment to see
if the VBA code would work.

Larry Linson
Microsoft Office Access MVP
 
P

PeterM

I'm using access 2003.

Douglas J. Steele said:
What version of Access?

Prior to Access 2007, macros have no error handling ability, so you'd need
to add a condition that the table must exist.

In Access 2007, I believe you can specify that you should continue on error.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)





.
 

Ask a Question

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.

Ask a Question

Top