Access 2010 - Continuous Forms: #Name? error

Hi EE Experts,

Am getting the #Name error

yet the field is in the underlying query

Below is a screen shot of the error and uploaded a
    simplified version of the   .mdb (running under A2010)

tx for your help, sandra

Name-Error.bmpEE-ARG-99-00-Scripts-frontend.mdb
mytfeinAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Jeffrey CoachmanMIS LiasonCommented:
Not sure,...something may have started to corrupt your form.

When I made a new form form the query, ...everything displayed fine...
See the form named the same as the query
EE-ARG-99-00-Scripts-frontend.mdb
Jeffrey CoachmanMIS LiasonCommented:
...Or most likely it has to do with all that code you are running on the form...?

But again, a simple form from the query displays everything just fine:
Looks good

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
mytfeinAuthor Commented:
Hi Jeffrey,

tx so much for replying...

ok, will rebuild the form,

tx, sandra
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

mytfeinAuthor Commented:
Hi Jeffrey,

So I created the form using the wizard just like you did....

Just wondering, how does Access alternate color the rows?  Do not see any vba behind the form that is doing this?

Is it possible to choose the colors?

Would be glad to open a new post on this question, if you like....

tx, sandra
PatHartmanCommented:
One common reason for this error is starting with a bound control where the ControlSource is xxx and the Name property of the control is also xxx.  Then changing the ControlSource to either another bound field such as yyy or making the control unbound either by removing the ControlSource entirely or by changing it to =somethingelse.

When you let the wizard build a form/report (the same problem exists with reports), the wizard uses the name of the bound field, which becomes the ControlSource as the Name property of the control.  Also if you drag a field from the Add Existing Fields list and place it on the form, the ControlSource and the Name are the same.  However, if you drag a control from the ribbon and place it on the form/report, Access assigns a sequenced name based on the type of control - text45, combo198.  You should always change these Names to something meaningful, while being careful to not reuse names from the form/report's RecordSource.

Since fields of the form's RecordSource get added to the Form's ControlSource collection, you have to be careful to NOT use the name of a RecordSource field as the Name property of a control UNLESS the control is bound to the same field.  So having a control name of "ClientID" when there is a field named "ClientID" in the form's RecordSource as long as the control named "ClientID" is bound to the RecordSource field named "ClientID".
PatHartmanCommented:
Click on the section header.  On the Format tab of the properties dialog is the Back Color property and the Alternate Back Color property.
mytfeinAuthor Commented:
Hi Pat,

thx for replying....

a) I deleted the problem txt box, re-drew it, chose a field for control source, named the field
    and it still gives the #name error....

b) ooh, i am not used to A2010 (coming from A2003)...  
    Our institution recently went from XP to Windows 7 and from Office 2003 to Office 2010.

    The past few months I was just testing many mdbs to see if they work under A2010.

    I was exploring the form's features just now bec A2010 is more contemporary and modern, and for now
    want to my form to look like it's traditional self.

    So I found the coloring buttons, and the new form looks like the traditional theme now....

    Still needs more work on my end....

    Might be back with related posts...

    tx so much everyone, sandra
mytfeinAuthor Commented:
all the solutions are the best solution  :-)   thx!
mytfeinAuthor Commented:
Hi Everyone,

I found the real cause of the problem.

Your help was the journey to the real cause.

(I have not used forms even in A2003 recently, and I usually clone existing forms, so I see today that I forgot the basics.)

I was re-building the form per your ideas, everything was fine, and then suddenly I got the #name error again.

I was moving vba behind the form..... and realized I am setting the record source internally based on combo box values

I had to add the field:  LogScripts_ProcessCount to this sql:

Public Sub q955_set_sql_rst_for_LogScriptsByDate _
                                      (strTableName_LogScripts As String, _
                                       strTableName_LogScriptsDesc As String, _
                                       varDate As Variant, _
                                       strBackSql As String)

strBackSql = "  SELECT L.LogScripts_Code" & _
             "        ,L.LogScripts_Date" & _
             "        ,L.LogScripts_Time" & _
             "        ,D.Script_Desc" & _
           " FROM " & strTableName_LogScripts & " AS L" & _
           "   INNER JOIN " & strTableName_LogScriptsDesc & " AS D" & _
           "      ON L.LogScripts_Code = D.Script_Code" & _
            " WHERE LogScripts_Date = " & strMakeSQLDate(varDate) & _
            " ORDER BY LogScripts_Code"


Debug.Print strBackSql

' pg_strSql = strBackSql

End Sub


tx again!
Jeffrey CoachmanMIS LiasonCommented:
Great,

Thanks for the update
mytfeinAuthor Commented:
:-)
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.