Question,

I attempted to write a function with the following declaration:

function findCodeVal( RegDSName as String, _
                      TableName as String, _
                      SrchColName as String, _
                      SrchFor as variant, _
                      RetColName as String, _
                      optional isCaseSensitive as boolean, _
                      optional isFuzzy as boolean, _
                      optional aConn as variant, _
                      optional UserName as String, _
                      optional Password as String) _
                      as variant

However, with this declaration, isMissing returns False for every optional parameter, even when none have been pass in to functions call.

When I changed the order of the parameters to:

function findCodeVal( RegDSName as String, _
                      TableName as String, _
                      SrchColName as String, _
                      SrchFor as variant, _
                      RetColName as String, _
                      optional UserName as String, _
                      optional Password as String, _
                      optional isCaseSensitive as boolean, _
                      optional isFuzzy as boolean, _
                      optional aConn as variant) _
                      as variant

Then isMissing returned the correct response in all cases. So is this because of the Boolean types as optional parameters?

If so, can any one tell me what other rules apply to order of optional parameters.

Thanks in advance.

Andrew 'Drew' Jensen

(Apologies if this is a second posting, I sent this yesterday but it does not seem to have made it for some reason)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to