Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-27-2012, 06:40 AM   #1
GT_engineer
Newly Registered User
 
Join Date: Aug 2012
Location: Hamilton, ON, Canada
Posts: 85
Thanks: 16
Thanked 2 Times in 2 Posts
GT_engineer is on a distinguished road
#Name? Error, text box can not find reference

I created a text box with a function for the control source =[Location]*2 where [Location] is a field on the same form (right beside this text box).

I get this error in the text box #Name?


I know this field exists, it's right beside the text box. Funny thing is it worked yesterday. Any ideas? Did I hit a switch or an option that disable functions???


Last edited by GT_engineer; 11-27-2012 at 06:48 AM.
GT_engineer is offline   Reply With Quote
Old 11-27-2012, 06:54 AM   #2
apr pillai
Newly Registered User
 
apr pillai's Avatar
 
Join Date: Jan 2005
Location: India
Posts: 652
Thanks: 0
Thanked 100 Times in 90 Posts
apr pillai is on a distinguished road
Send a message via AIM to apr pillai Send a message via Yahoo to apr pillai Send a message via Skype™ to apr pillai
Re: #Name? Error, text box can not find reference

Look closely whether you have added a space by mistake before/after the word Location, like [ Location]*2 or [Location ]*2
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Learn MS-Access Tips and Tricks)

All responses are based on Access2003/2007
apr pillai is offline   Reply With Quote
Old 11-27-2012, 06:59 AM   #3
pr2-eugin
Super Moderator
 
pr2-eugin's Avatar
 
Join Date: Nov 2011
Location: Bournemouth, UK
Posts: 8,498
Thanks: 68
Thanked 2,061 Times in 2,011 Posts
pr2-eugin has a spectacular aura about pr2-eugin has a spectacular aura about
Re: #Name? Error, text box can not find reference

Did you accidentally change the name of the field? Try recreating the field..

__________________
Regards,
Paul Eugin

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
!
Windows 7 Professional, MS Access 2010
---------------------------------------------------------------------------------------------------------------------
If the above post has helped you, please click the scales
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
or click the 'Thumbs up'. Cheers.

---------------------------------------------------------------------------------------------------------------------



pr2-eugin is offline   Reply With Quote
Old 11-27-2012, 07:11 AM   #4
GT_engineer
Newly Registered User
 
Join Date: Aug 2012
Location: Hamilton, ON, Canada
Posts: 85
Thanks: 16
Thanked 2 Times in 2 Posts
GT_engineer is on a distinguished road
Re: #Name? Error, text box can not find reference

I am using 2010, so I am using the expression creater hence I am not typing in the word [Location] but chossing it from a list of fields located on the form.

I try deleting and re-adding those fields back into the form, no luck
GT_engineer is offline   Reply With Quote
Old 11-27-2012, 08:57 AM   #5
GT_engineer
Newly Registered User
 
Join Date: Aug 2012
Location: Hamilton, ON, Canada
Posts: 85
Thanks: 16
Thanked 2 Times in 2 Posts
GT_engineer is on a distinguished road
Re: #Name? Error, text box can not find reference

Sorry forgot to mention, I don't know if this effects it or not. But the form is in continous view. Thanks for any help
GT_engineer is offline   Reply With Quote
Old 11-27-2012, 09:18 AM   #6
GT_engineer
Newly Registered User
 
Join Date: Aug 2012
Location: Hamilton, ON, Canada
Posts: 85
Thanks: 16
Thanked 2 Times in 2 Posts
GT_engineer is on a distinguished road
Re: #Name? Error, text box can not find reference

Gents, I deleted and recreated the form from scratch, its working now. Thanks

I don't know why this was happening, bug perhaps
GT_engineer is offline   Reply With Quote
Old 11-27-2012, 09:41 AM   #7
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,799 Times in 1,570 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: #Name? Error, text box can not find reference

Just a note. On Reports, if you have a control that uses an expression and that expression refers to a field where there is a control with that same name, you need to change the control name. So, if you are using

=[MyText]

and there is a textbox on the form named MyText and it is bound to a field named MyText, then it will generate the #Name error. If you rename the control to txtMyTest and then still refer to the field using
=[MyText]
it will no longer give the error.

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-27-2012, 11:19 AM   #8
GT_engineer
Newly Registered User
 
Join Date: Aug 2012
Location: Hamilton, ON, Canada
Posts: 85
Thanks: 16
Thanked 2 Times in 2 Posts
GT_engineer is on a distinguished road
Re: #Name? Error, text box can not find reference

yes I noticed that with reports, is that becuase in reports in refers to table fields instead of report(form) fields????
GT_engineer is offline   Reply With Quote
Old 04-25-2016, 11:36 PM   #9
ddetding
Newly Registered User
 
Join Date: Apr 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ddetding is on a distinguished road
Re: #Name? Error, text box can not find reference

I had this issue also! I was using =[LAST] + ", " + [FIRST] in my control and still no matter the combinations I had no avail to resolve the issue.
I would close my database and each time it opened it would still give me the #name? error. I was using a form with tabs and a continuous subform where my text box with the above information was entered. Luckily I had a command button in my subform also which pulled an error and I found a way to resolve that error which worked for both my button AND the #name? error!
I had to add an empty Form_Load() event to the main form.

that's all. no extra code. Hope this helps anybody else also!
ddetding is offline   Reply With Quote
Old 05-16-2016, 09:35 AM   #10
zecixx
Newly Registered User
 
Join Date: May 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
zecixx is on a distinguished road
Re: #Name? Error, text box can not find reference

Quote:
Originally Posted by ddetding View Post
I had this issue also! I was using =[LAST] + ", " + [FIRST] in my control and still no matter the combinations I had no avail to resolve the issue.
I would close my database and each time it opened it would still give me the #name? error. I was using a form with tabs and a continuous subform where my text box with the above information was entered. Luckily I had a command button in my subform also which pulled an error and I found a way to resolve that error which worked for both my button AND the #name? error!
I had to add an empty Form_Load() event to the main form.

that's all. no extra code. Hope this helps anybody else also!
WORKED! After updating Access All my DLOOKUPs where failing. Something changed, but after adding


Private Sub Form_Load()

End Sub

to my form, things starting working again.
zecixx is offline   Reply With Quote
Old 10-25-2016, 12:52 AM   #11
starley_rover
Newly Registered User
 
Join Date: Dec 2014
Location: UK
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
starley_rover is on a distinguished road
Re: #Name? Error, text box can not find reference

I had a similar problem but found a work-around.

Scenario: I have a database of at risk Health Care Workers, with a subtable of dates and results of tests. I needed to generate a date twelve weeks after the maximum date entered for each HCW. No problem. I added a text box to the footer of the subform, and this listed the max date, plus 84. On my main form, using the correct syntax, I then referenced the name of this text box and its subform. Everything was fine for a while. Then I got the dreaded #Name?.

I tried everything suggested above. I checked for naming conflicts. I deleted the text boxes, compacted and repaired, recreated the text boxes, rebuilt the form from scratch. Repeatedly. No joy.

After a day, I tried a different tack. Totals query listing unique HCW ids and their maximum dates. Then another query linking this first query to relevant fields from my main table, with a due date (from the max date, plus 84). This second query is now the source of my main form. I hope this helps someone out there.

Thanks for reading

Mark
starley_rover is offline   Reply With Quote
Old 10-25-2016, 06:06 AM   #12
starley_rover
Newly Registered User
 
Join Date: Dec 2014
Location: UK
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
starley_rover is on a distinguished road
Re: #Name? Error, text box can not find reference

Uh oh! This is not a good work-around. Because my form is based upon a totals query, I can't add a new record. Back to where I started. Mark
starley_rover is offline   Reply With Quote
Old 10-25-2016, 06:47 AM   #13
starley_rover
Newly Registered User
 
Join Date: Dec 2014
Location: UK
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
starley_rover is on a distinguished road
Re: #Name? Error, text box can not find reference

Another work around:

My main form is now based upon the table.

My sub form now has a header with a text box with the formula: =Max([sampledate])+84

Changed the subform to continuous.

Added On Load to main form

Private Sub Form_Load()
Me.sbfMonitoring.Form.FormHeader.Visible = True
End Sub

And I can now add records.

(hope you’re still awake ;-)

Mark

starley_rover is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you reference the value in a text box AshikHusein Modules & VBA 3 02-26-2009 08:47 AM
text box to reference a variable name Geordie2008 Reports 2 04-08-2008 04:26 AM
Text Box Reference - there must be a way !! Cees555 Forms 4 09-28-2004 05:57 AM
find queries, forms which reference column name stormin_norm General 3 09-03-2003 03:06 PM
Reference the the label associated to a Text Box George Too Modules & VBA 2 02-12-2003 02:40 PM




All times are GMT -8. The time now is 09:42 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World