function true false to macro ??

  • Thread starter Thread starter steve
  • Start date Start date
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.
 
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.
 
Back
Top