I recently was writing vba code for Excel 2000 and used the optional parameter convention in one of my parameter lists. However, when I tried this in Access 2000, when I added Optional to the beginning of one of my function's parameter list, the editor would highlight the Optional word as an error.
I've written a function to look at the content of the user modifiable fields on my form and determine if they contain valid data in relation to each other. I call this function from each of the exit events of these fields and pass the field's name and its text value. I also call this function from the forms current event and pass in two empty strings.
The function looks at these input parameters and if a field name and text value is passed in then it uses the text value instead of the fields value. When empty strings are passed in then only the field values are used. What I'd like to do is make the field name and text parameters optional, then I wouldn't have to pass in two empty strings. Not a big deal, but I found it strange that the optional parameter didn't work.
|