Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Ms Access bound textbox returns #name? and checkbox is "bound to unknown field"

Posted on 2014-01-21
8
Medium Priority
?
1,943 Views
Last Modified: 2014-01-27
I'm using a form bound to a query that selects from one table. I added a short date formatted text box and a checkbox to the form after updating the table, then the query (selecting from the field list), and checking that data in the table was returned and could be edited.

Both new controls are giving problems. The textbox returns #Name? and the checkbox reports that its bound to an unknown field. I'd happily believe that - except that in both cases, the controlsource properties were selected from the list of available fields. The field the checkbox reports has the correct name.

If I change the bound names to other fields from the query with apparently identical definitions, they work properly. Its only when I use the new fields that I have an issue. I've used Access for a long time but haven't come across anything like this before - any ideas, please?
0
Comment
Question by:MikeDiggins
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 3

Expert Comment

by:Sreeram
ID: 39799101
Hi

   you need to create a dummy column for the text box and checkbox in the record source query or remove the control source of that control.

Thanks
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1600 total points
ID: 39799156
Could be corruption. Backup your entire and them compact it. If that doesn't work try removing the controls, then close and reopen the snow, then add the controls back.
0
 
LVL 21
ID: 39799195
Try changing the control name to have a txt (for textbox) and chk (for checkbox) prefixes. This will make sure there are not any name conflicts between contrtols and fields confusing Access.
0
How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

 

Author Comment

by:MikeDiggins
ID: 39799524
Thanks, all
Scott, we have had some corruption before on the codebase so I'll try that. Coach, good point, should have mentioned I'm already doing that, as well as making sure "Date" columns don't start with "date".
kujumbio, I'm not quite with you. The query is already drawing those fields from the database and I can see them as options in the dropdown list when allocating the controlsource property. I know the literature has misspelt (probably through being typed in) column names as the usual cause but that's not the case here. Am I missing something by your reference to dummy columns, I wonder?
0
 
LVL 85
ID: 39799688
kujumbio, I'm not quite with you.
I didn't understand that advice either.  You don't need "dummy" columns, you're working with the columns defined on your table.

Also, sorry about my somewhat inane posting earlier. I was doing this from my Kindle and obviously auto-correct struck!!
0
 
LVL 39

Expert Comment

by:PatHartman
ID: 39800365
The most common reason for that error is using a column name from the RecordSource as the Name property of a control that is not bound to the column.  When you use the wizard to build a form or when you drag fields from the field list, Access automatically assigns the field name as the Name property of the control.  If you later change the control to bind it to some other field or even make it unbound, you will see the #name? error.

If changing the Name property so that it doesn't conflict with existing names doesn't resolve the error, the problem could be corruption.  Delete the control from the form.  Save it.  Compact the database.  Then reopen the form and add the control back.

As someone has already mentioned, best practice is to change all the Name properties by adding a prefix such as txt, chk, cbo, etc.  This has the advantage in code of allowing you to distinguish between referencing the control itself and the bound field.
0
 

Author Comment

by:MikeDiggins
ID: 39813477
No worries, Scott - knew what you meant.
Thanks everyone, this turned out to be an unusual way of reporting corruption. I was able to use the SaveAsText function folllowed by LoadFromText into a new database, then imported the result. Still going to rebuild the database into a new one, though - corruption seems to continue until you do that. Or maybe I'll just rebuild into something other than Access!
0
 

Author Closing Comment

by:MikeDiggins
ID: 39813484
THnaks for the clear explanations; they gave plenty to think about whether or not they were the answer
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question