#Name? error in text box

R

RJB

I've got a form that is a workorder for a printing company.
In that form is a subform for specific job details (jobID, fileType, Papers,
etc...)
For the field "Papers", I need to limit the number of enteries to 6
different papers. I'm going about this by having a form open up 'OnEnter' of
the "Papers" field. That works great.
The form that opens (PaperSelector) has 7 unbound text boxes. 6 for the
different types of stocks, and 1 ("AllPapers") that automatically fills in,
combining the information from the first 6 boxes.

What I need is to have the field "Papers" on the subform autofill with the
information from the "AllPapers" field. Here's what I've got in the
'Control Source' property for "Papers".

=[Forms]![PaperSelector]![AllPapers]

The Chr(13) is to insert a carriage return to separate each paper type so
they'll display nicely on the report they will ultimately be output to.
However, this is generating a #Name? error in the "Papers" field on the
subform. What am I missing - or is this an overly complicated way to do a
very easy thing?

Thanks.
RJB
 
S

SteveS

You've bound the control "Papers" to a control (AllPapers) on a form
(PaperSelector) that is closed.

It is like computers on a LAN. Your computer (the control "Papers") is
looking for a file (the control "AllPapers") on a server (the form
"PaperSelector") that is powered down.

So in this case, "#Name" is telling you "I cannot find
"[Forms]![PaperSelector]![AllPapers]".

To save the selected stocks, the control "Papers" on the subform needs to be
bound to a field in the subform's recordset.

So now the problem is to get the data from
"[Forms]![PaperSelector]![AllPapers]" to the control "Papers" on the subform.
You could have two buttons on the form "PaperSelector". One button,
"Cancel", to close the form without saving, and the other button to save (or
update) the data in "AllPapers" to the control "Papers" in the subform, and
then close the form.


Just for clarity, tables have fields. Forms have controls. Controls are
unbound or bound to fields in the form's recordset.


HTH
 
Top