Does that final 'as string' make everything inside the parenthesis a string?
No, it defines the data type of the value returned by the function as a string. If you leave it off, it is as WGM says, open to interpretation. If you leave that off, IIRC the data type returned is determined by Access, so not the best approach to take.
Also, everything inside the parenthesis should be labeled as it is in the table correct? meaning, a field that is a string should be a string, a date should be a date?
Not always. If your field might contain nulls then the function will usually raise an error when it encounters them. In that case, you'd need to define the variable in the argument as a Variant. Also, you can pass objects to functions, so the variable type in those cases has nothing to do with table fields. Then there is the availability to pass user defined types to a function, which likely would never be the type of a table field.
If you're thinking that the return type should match the table field in cases where you intend to enter the returned value in a table, then I think "no" again (where Decimal is concerned). AFAIK, Access still does not accept Decimal as a return type.
Last edited by Micron; 01-21-2023 at 02:11 PM.
Reason: clarification
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.