I have a MS Access application and have problem to find a return type of function. Is there a way to find return type of object? I have type mismatch error.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it is a built-in function, look at the Access help topic.
If it is a user-defined function, examine its definition.
If you can do neither, use the
TypeName()function to tell you the data type returned byYourFunction().If
YourFunction()returns a variant,TypeName()will tell you the variant subtype.Heinzi suggested
VarType()instead ofTypeName(). I habitually reach forTypeName()first simply because it’s quicker for me, and I’m seldom concerned with its limitations. However I agree with Heinzi;VarType()is better.JP. offered two other useful suggestions. First, you can create a simple procedure which declares a Variant variable and assign your function’s return value to the variable. Then add a temporary break point (with F9) on the first
Debug.Printline, run the procedure, use F8 to move through it line by line, and monitor the variable’s value in the Locals Window. (Open that window from the VB editor’s main menu. View -> Locals Window)And second, for built-in functions that have a return type, you can take advantage of Intellisense to see the return type as you are typing the function name and/or the parameters.