Is it worth the effort??

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???
 
J

John W. Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top