Form will not show field as a subform

See the attached screenshots, the form shows the Period Count fine in the form view, but when viewed as a subform, the Period Count shows #Name?.  I have checked to make sure the Control Source is correct and I have even recreated the form.  I can not figure out why it is doing this.  Any ideas?

Form View
Form View
Subform View
Subform View
SDKCompanyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mbizupCommented:
What is the control source of that field?

If it is based on other controls, the path to these controls may differ depending on whether you are working with forms or subforms.

See the following about subform references:
http://access.mvps.org/access/forms/frm0031.htm
0
mbizupCommented:
Just a quick note about that article - the references are VBA references.  You would need to drop the Me! prefix for references in property sheets.
0
Swapnil NirmalManager, Audit AnalyticsCommented:
the field type might be defined wrongly in sub form. it should be the same as defined in the main sheet. just set it in properties.
i think this will solve the problem
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

SDKCompanyAuthor Commented:
The query for the subform has the following SQL:
SELECT tbl_TC_Select_List.Period, tbl_TC_Select_List.Trend, tbl_TC_Select_List.Description, tbl_TC_Select_List.TotPerCount, tbl_TC_Select_List.AdvCount, tbl_TC_Select_List.LastAdv FROM tbl_TC_Select_List ORDER BY tbl_TC_Select_List.LastAdv DESC , tbl_TC_Select_List.AdvCount DESC , tbl_TC_Select_List.Trend;

Open in new window


The field in question "txt_PerCnt" has its control source set to TotPerCount.  When I view the form by itself it works great, but when viewed through the subform control on the the main form, that field does not function properly.

n_swapnil
I am not sure what you mean by the field type might be defined wrongly in the sub form as it should be the same as defined in the main form.

The main form is not linked to the subform at all, it is more or less a container for multiple subforms.
0
SDKCompanyAuthor Commented:
I am attaching the database if someone can take a look at it, maybe the problem can be identified.

On the form that opens, click on the PCRS Data tab and you will see the subform in question.  The name of the of the main form is frm_Main and the name of the subform is subfrm_Trend_List.
SubFormHelp.accdb
0
Jeffrey CoachmanMIS LiasonCommented:
Not sure, ...I recreated the subform from scratch and TotPeCount, displayed fine...

So perhaps that subform was a little corrupt...

JeffCoachman
0
SDKCompanyAuthor Commented:
Did it display fine through the subform control on frm_Main?  I displays fine for me by itself, but not through the subform control.  Perhaps I will delete the subform control and reinsert it to see if something is corrupt there.
0
Jeffrey CoachmanMIS LiasonCommented:
<Did it display fine through the subform control on frm_Main?>
Yes, see my screenshot:
screen
<Perhaps I will delete the subform control and reinsert it to see if something is corrupt there.>
This may not work, just re-inserting the same corrupt subform would not something I would "trust" in a production database, ...even if it did work.

It took me all of 1 minute to recreate the subform from scratch...
;-)
The only issue was getting the sumform name to match what you had in your code...

JeffCoachman
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SDKCompanyAuthor Commented:
OK, I have solved the issue.  This has been a learning experience through the development of this whole application.  Sometimes the little things cause you to dig deeper than you need to.  What the issue was had to do with the Review Period selection boxes on the main form.  When one of those are clicked, it changes the SQL of the subform to only show the Review Period selected.  Because I added the Period Count later, I did not update the VBA code to add the Period Count to the SQL.  Needless to say, I feel a little silly.
0
SDKCompanyAuthor Commented:
I have accepted all expert comments as the solution as I appreciate everyone's input.  I gave boag2000 some extra as he took the time to dissect the DB.
0
Jeffrey CoachmanMIS LiasonCommented:
So to be clear, what post actually solved the issue, ...this is the post that should have the lions share of the points.
If this was not my post, then so be it...

;-)

JeffCoachman
0
SDKCompanyAuthor Commented:
Jeff,

None of the expert posts actually solved the issue.  I figured out the solution as I methodically dug through the code.  However, I awarded all the experts for providing information.  I awarded you extra because you actually took extra time to dig into the database to try and figure out what was going on.

Thanks again to all that contributed!
0
Jeffrey CoachmanMIS LiasonCommented:
<None of the expert posts actually solved the issue.>
Then buy the rules of this site you are not allowed to accept any experts posts.

When you select a post as the "solution" is is marked as such.
If the accepted posts are not really the solution then this will confuse other members searching here for the same issue.

If you find the answer on your own, you can post the "actual" solution, .and accept your own post.

Please click the "request Attention link and explain your wishes...

JeffCaochman
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.