Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

#name? - Access 2007 - subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick A - 04 Jun 2007 15:28 GMT
On a subform I'm receiving a #name? error in Access 2007.

I have a form/subform that is displayed on a tab in another form.
Yes a form with a tab control that has a form/subform combination.
When I display the form/subform outside of the tab it works, no
#name? on the subform. When I display the same form/subform inside
the tab I see #name?. All this is in Access 2007. Everything works
just fine in Access 2000, 2002, and 2003.

I took my Access 2000 base code to Access 2007. I opened the subform
in question and the record source was gone. Why I have no idea.
It shows fine in Access 2000. Anyway I put it back.

But that did not solve the problem.

I'm convinced it's a feature/bug in Access 2007.

Does anyone have any ideas?  Has anyone run into this?

Rick
Allen Browne - 04 Jun 2007 17:42 GMT
It may help to know what's in the Control Source of the text box that yields
#Name.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

On a subform I'm receiving a #name? error in Access 2007.

I have a form/subform that is displayed on a tab in another form.
Yes a form with a tab control that has a form/subform combination.
When I display the form/subform outside of the tab it works, no
#name? on the subform. When I display the same form/subform inside
the tab I see #name?. All this is in Access 2007. Everything works
just fine in Access 2000, 2002, and 2003.

I took my Access 2000 base code to Access 2007. I opened the subform
in question and the record source was gone. Why I have no idea.
It shows fine in Access 2000. Anyway I put it back.

But that did not solve the problem.

I'm convinced it's a feature/bug in Access 2007.

Does anyone have any ideas?  Has anyone run into this?

Rick
Rick A - 04 Jun 2007 19:27 GMT
The form is based on a table called tblDog and the subform is based on a
table called trelDogRegistration.  From a data modeling it's a classic 1 to
many construct.

The fields that show the #name? are all from the trelDogRegistration table.
The Control Source is the field name directly from the table.

The form in question is used two ways
1) as a stand alone form.
2) as a subform

When used as a stand alone form the subform displays correctly.  In other
words there is data, no #name?.
When used as a subform the subform displays with the #name?.

The link fields for the subform are
   link child fields = DogID;organizationcd
   link master fields = DogID;txtorganizationcd

I use a field off of the form for this because the table tblDog does not
contain the organization code.

When the form is a subform the link fields are the same for the subform.  I
do not do anything in code that changes the links.  The links for the form
when it is a subform are:
   link child fields = DogID
   link master fields = txtDogID

Does this make sense?

I know if I were reading this I would get lost quickly because there is a
lot of details and I would blow this off.  Way too much thinking involved.

Bottom line for me, there's something wrong with Access 2007 and nested
subforms.  Again, this works in Access 2000, 2002, and 2003.

Does anyone have any issues with nested subforms in Access 2007?

Rick

> It may help to know what's in the Control Source of the text box that
> yields #Name.
[quoted text clipped - 19 lines]
>
> Rick
Allen Browne - 05 Jun 2007 03:32 GMT
As you say, that's all very standard.

There's a couple of things that A2007 does oddly.
One is that it fails on an expression such as:
   =[Form].[RecordsetClone].[RecordCount]
If you have any controls on the form that contain an expression (starts with
"="), try deleting those controls temporarily. (There's a situation where
Access quits trying to calcluate controls once one fails. That's why it's
important to delete all calculated controls to eliminate this possibility.)

There is also an issue where the AccessField type can confuse Access. If any
of the names in LinkChildFields or LinkMasterFields is not a control name,
clear the properties, add a text box for that control, save, and then set
the LinkChildFields/LinkMasterFields properties to the name of the control.

Turning off Name AutoCorrect may help also:
   Office Button | Access Options | Current Database | Name AutoCorrect

As you are switching versions, it may help to compact, decompile, and
compact again.

You say the form is bound directly to the table, so it cannot be a cyclical
reference to something in a query.

Presumably your References are all okay.

You might also clear any input mask, format, and default value from the
control on the form and also from the field in the table, to eliminate that
possibility also.

Hopefully something there leads you in a useful direction.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> The form is based on a table called tblDog and the subform is based on a
> table called trelDogRegistration.  From a data modeling it's a classic 1
[quoted text clipped - 59 lines]
>>
>> Rick
Allen Browne - 05 Jun 2007 03:36 GMT
Another possibility is if the Name property of the text box is the same as
the name of something else.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> As you say, that's all very standard.
>
[quoted text clipped - 94 lines]
>>>
>>> Rick
Rick A - 05 Jun 2007 14:32 GMT
Thanks Allen.

I'll look into all of the suggestions you provided.

Rick

> As you say, that's all very standard.
>
[quoted text clipped - 94 lines]
>>>
>>> Rick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.