> However, I get the error code "Compile error: Variable not
> defined" and the "POCName" is highlighted. I am not very
> proficient with VBA, but where do I define the variable?
You don't define the variable. The code is supposed to use the name of the
text box, and the name of the label that you *placed* on the form.
So, no, you don't have to define the variable, but you must use either an
existing variable, or the name of a control on the form. (in your case, you
need to use the same name as what the text box control is named on the
form).
You probably should not use the default name that ms-access gives (like
text22 etc). so, highlight the text box in design mode, and you can thus see
the name of the control in the properties tab.
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.attcanada.net/~kallal.msn