function true false to macro ??

S

steve

I have a function that tells if a table exists.

I know that I can put an error message in the function that will
respond if the table is found or not. But is there a way to pass the
true false to a condition in a macro in the macro builder to give a
message.

Eg if it is found msgbox "found" if not msbox "not found"

Basically can you have code pass something to a condition in a macro.

thanks.
 
D

Douglas J. Steele

Functions are intended to return values.

The function should be defined as:

Function TableExists(NameOfTable As String) As Boolean

and then TableExists should be defined as True if the table exists, or False
if it doesn't.
 

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