Share via

#Name? Error on subform

Anonymous
2019-01-03T12:32:03+00:00

I've created a form with a percentage calculation. The form works perfectly. But, when I put the form on my menu form, the calculated field changes to #Name?. It's not referenced on the menu - the forms don't interact in any way.

What could be causing this?

Thanks!

April

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Duane Hookom 26,825 Reputation points Volunteer Moderator
2019-01-03T14:32:26+00:00

I think you don't need to reference the form. Try:

=[Units]/[Total]

However I'm not sure if you really mean [Units] or if it is [Count].

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. ScottGem 68,830 Reputation points Volunteer Moderator
    2019-01-03T16:43:42+00:00

    Yes, when you identified that the controls you want are on frmStatusWin10 in the Forms collection Access will look for them there. But they aren't there anymore. Then are in Forms!frmMenu!frmSTatusWin10.form.Units. That's why the error.

    By not qualifying where they are, Access looks on the current form.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2019-01-03T15:44:13+00:00

    I think you don't need to reference the form. Try:

    =[Units]/[Total]

    However I'm not sure if you really mean [Units] or if it is [Count]. 

    That works! And now that I look at it, I can see it.

    I had the formula that way before but it kept giving me the wrong numbers.

    Thanks!

    April

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2019-01-03T13:55:04+00:00

    I have a frmStatusWin10 with four fields:

    OS

    Count

    Total

    Percent (Calculated field: =[Forms]![frmStatusWin10]![Units]/[Forms]![frmStatusWin10]![Total] )

    When the form is opened, it shows everything correctly:

    OS                     Units       Percent       Total

    Not Win10         39              53%              74

    Windows 10       34              46%              74

    Windows 7           1              1%               74

    I made frmStatusWin10 a subform on my menu form, and it shows:

    OS              Units       Percent       Total

    Not Win10        39       #Name?       74

    Windows 10      34      #Name?       74

    Windows 7        1        #Name?       74

    Was this answer helpful?

    0 comments No comments
  4. ScottGem 68,830 Reputation points Volunteer Moderator
    2019-01-03T13:07:20+00:00

    In an embedded form, the references are different. What is the Controlsource of the control.

    Was this answer helpful?

    0 comments No comments