Is it worth the effort??

  • Thread starter Thread starter Steve S
  • Start date Start date
S

Steve S

Is it worth the effort to convert all (or most) of the form control
references such as 'Forms!FormName!Control' to public variables? Are public
variables nore efficient than direct form references? Is referencing the
value of a form control in a query best done with a direct reference or with
a function to retieive a public variable.

Also does anyone have a generic function that can be used to retrieve any
public variable: both string and numeric values? Right now I have a function
for each public variable that I use in a query

Thoughts, comments, and suggestions???
 
Is it worth the effort to convert all (or most) of the form control
references such as 'Forms!FormName!Control' to public variables? Are public
variables nore efficient than direct form references? Is referencing the
value of a form control in a query best done with a direct reference or with
a function to retieive a public variable.

I'd say *NO*. Public variables lose their values when there's any break in the
code, and it's a right pain to keep them defined. The Forms! reference is
clear, self-documenting and unambiguous; and as for efficiency, it's direct
whereas the public variable involves an extra step to retrieve the value into
the variable.
Also does anyone have a generic function that can be used to retrieve any
public variable: both string and numeric values? Right now I have a function
for each public variable that I use in a query

Thoughts, comments, and suggestions???

Don't overuse public variables: and anything other than very sparing use would
probably be overuse.
 
Back
Top