A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Name? error in text box



 
 
Thread Tools Display Modes
  #1  
Old February 11th, 2007, 10:55 PM posted to microsoft.public.access.forms
RJB
external usenet poster
 
Posts: 7
Default #Name? error in text box

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


  #2  
Old February 13th, 2007, 05:47 PM posted to microsoft.public.access.forms
SteveS
external usenet poster
 
Posts: 132
Default #Name? error in text box

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
--
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


"RJB" wrote:

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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.