Access ошибка 2455

Yesterday, a form/subform that worked well for me for a long time suddenly started throwing Error 2455: You entered an expression that has an invalid reference to the property Form/Report.

Below is my diagnosis of the problem. It feels like a bug.

My question is: Have any of you ever seen this? If you are interested, could you try to duplicate the problem, and let me know what you find?

The Problem:

  • I had a form that worked perfectly standalone, setting recordsources for each of its subforms
  • But the form failed when it was put in a subform control, throwing error 2455 for every subform when trying to set the SubForm.Form.RecordSource property (but again, only when the form itself was a subform)

After lots of experimentation, I narrowed it down to this:

  1. The SubForm control was too short to show the form’s Detail section. Only the Header was visible.
  2. Since the form’s detail was not visible, Access silently disabled all of the subforms under the form!!!

My Workaround: Always ensure that at least part of the form’s Detail section is visible in the SubForm control. Either:

  • Increase the height of the SubForm control
  • Move controls from the form Header to the detail, and make the Header shorter, or invisible, so only the detail shows.

Can you duplicate this? This is weird, so I would like some independent confirmation of this problem. So, please, if you have a little time, try these steps:

  1. Make a form with:
    • A subform control that holds a grandchild form
    • A header section, height 0.5 inches
  2. Add this form as a child in a parent subform control
  3. The working case:
    • Set the parent’s subform height to .6 inches, so the child’s detail section is visible
    • In code, refer to the child’s subform.Form.RecordSource property (the grandchild).
    • Expectation: no error
  4. The failing case:
    • Now, set the parent subform height to .4 inches, so the detail is NOT visible
    • Rerun the code that touches the child’s subform.Form.RecordSource property.
    • Expectation: Runtime Error 2455

My ‘grandchild’ forms have no RecordSource when loaded. The recordsource is set in code after the parent/child forms load.

Please, indicate the version of Access you are running, and what results you get. I’m running Access Version 14.0.7128.5000, which seems pretty up-to-date.

Icon Ex Номер ошибки: Ошибка 2455
Название ошибки: You entered an expression that has an invalid reference to the property |
Описание ошибки: You entered an expression that has an invalid reference to the property |.@The property may not exist or may not apply to the object you specified.@@2@4@2015567@1.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Access
Относится к: Windows XP, Vista, 7, 8, 10, 11

Проверка «You entered an expression that has an invalid reference to the property |»

Обычно люди ссылаются на «You entered an expression that has an invalid reference to the property |» как на ошибку времени выполнения (ошибку). Когда дело доходит до программного обеспечения, как Microsoft Access, инженеры могут использовать различные инструменты, чтобы попытаться сорвать эти ошибки как можно скорее. К сожалению, такие проблемы, как ошибка 2455, могут не быть исправлены на этом заключительном этапе.

«You entered an expression that has an invalid reference to the property |.@The property may not exist or may not apply to the object you specified.@@2@4@2015567@1.» может возникнуть у пользователей Microsoft Access даже при нормальном использовании приложения. Таким образом, конечные пользователи предупреждают поставщиков о наличии ошибок 2455 проблем, предоставляя информацию разработчику. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Чтобы исправить любые документированные ошибки (например, ошибку 2455) в системе, разработчик может использовать комплект обновления Microsoft Access.

Что генерирует ошибку времени выполнения 2455?

В первый раз, когда вы можете столкнуться с ошибкой среды выполнения Microsoft Access обычно с «You entered an expression that has an invalid reference to the property |» при запуске программы. Проанализируем некоторые из наиболее распространенных причин ошибок ошибки 2455 во время выполнения:

Ошибка 2455 Crash — программа обнаружила ошибку 2455 из-за указанной задачи и завершила работу программы. Эти ошибки обычно возникают, когда входы Microsoft Access не могут быть правильно обработаны, или они смущены тем, что должно быть выведено.

Утечка памяти «You entered an expression that has an invalid reference to the property |» — ошибка 2455 утечка памяти приводит к увеличению размера Microsoft Access и используемой мощности, что приводит к низкой эффективности систем. Это может быть вызвано неправильной конфигурацией программного обеспечения Microsoft Corporation или когда одна команда запускает цикл, который не может быть завершен.

Ошибка 2455 Logic Error — Логическая ошибка возникает, когда ПК производит неправильный вывод, даже когда пользователь вводит правильный вход. Это может произойти, когда исходный код Microsoft Corporation имеет уязвимость в отношении передачи данных.

Основные причины Microsoft Corporation ошибок, связанных с файлом You entered an expression that has an invalid reference to the property |, включают отсутствие или повреждение файла, или, в некоторых случаях, заражение связанного Microsoft Access вредоносным ПО в прошлом или настоящем. В большинстве случаев скачивание и замена файла Microsoft Corporation позволяет решить проблему. В качестве последней меры мы рекомендуем использовать очиститель реестра для исправления всех недопустимых You entered an expression that has an invalid reference to the property |, расширений файлов Microsoft Corporation и других ссылок на пути к файлам, по причине которых может возникать сообщение об ошибке.

Ошибки You entered an expression that has an invalid reference to the property |

Усложнения Microsoft Access с You entered an expression that has an invalid reference to the property | состоят из:

  • «Ошибка программного обеспечения You entered an expression that has an invalid reference to the property |. «
  • «Недопустимая программа Win32: You entered an expression that has an invalid reference to the property |»
  • «Извините за неудобства — You entered an expression that has an invalid reference to the property | имеет проблему. «
  • «You entered an expression that has an invalid reference to the property | не может быть найден. «
  • «Отсутствует файл You entered an expression that has an invalid reference to the property |.»
  • «Проблема при запуске приложения: You entered an expression that has an invalid reference to the property |. «
  • «Файл You entered an expression that has an invalid reference to the property | не запущен.»
  • «You entered an expression that has an invalid reference to the property | остановлен. «
  • «Неверный путь к программе: You entered an expression that has an invalid reference to the property |. «

Обычно ошибки You entered an expression that has an invalid reference to the property | с Microsoft Access возникают во время запуска или завершения работы, в то время как программы, связанные с You entered an expression that has an invalid reference to the property |, выполняются, или редко во время последовательности обновления ОС. Важно отметить, когда возникают проблемы You entered an expression that has an invalid reference to the property |, так как это помогает устранять проблемы Microsoft Access (и сообщать в Microsoft Corporation).

Причины проблем You entered an expression that has an invalid reference to the property |

Эти проблемы You entered an expression that has an invalid reference to the property | создаются отсутствующими или поврежденными файлами You entered an expression that has an invalid reference to the property |, недопустимыми записями реестра Microsoft Access или вредоносным программным обеспечением.

Более конкретно, данные ошибки You entered an expression that has an invalid reference to the property | могут быть вызваны следующими причинами:

  • Поврежденная или недопустимая запись реестра You entered an expression that has an invalid reference to the property |.
  • Вирус или вредоносное ПО, которые повредили файл You entered an expression that has an invalid reference to the property | или связанные с Microsoft Access программные файлы.
  • You entered an expression that has an invalid reference to the property | ошибочно удален или злонамеренно программным обеспечением, не связанным с приложением Microsoft Access.
  • Другая программа находится в конфликте с Microsoft Access и его общими файлами ссылок.
  • Microsoft Access (You entered an expression that has an invalid reference to the property |) поврежден во время загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2023 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

I have three forms in an Access 2003 database (developing in Access 2007) that sit in a parent -> child -> grandchild relationship. In the ‘Form_Load’ sub of the child form, I set some properties of the grandchild (form header, row source, and control logic). When I view the child form, everything works properly. When I view the parent form, I get the error:

Run-time error ‘2455’: You entered an expression that has an invalid reference to the property Form/Report.

in reference to the line:

Me.GrandchildFormName.Form.Foo.Caption = "bar"

I can access any property of the grandchild form except the Form property without throwing any errors. Does anyone know what might be causing this? I made a test case in a new database and it worked fine, so I’m leaning towards there being something in the legacy code I inherited with the database (which, I’ve been told, goes back 18 years to a pre-Access database system) that is causing the problem, but I figured I’d check here to see if any of you might know a work-around.

If it’s relevant, the actual structure of the forms is a bit more complicated, with the grandchild form appearing multiple times (under different control names) in the child form, like this:

|--------------|
| A            |
|  |----------||
|  | B        ||
|  |  |------|||
|  |  | C[1] |||
|  |  |------|||
|  |          ||
|  |  |------|||
|  |  | C[2] |||
|  |  |------|||
|  |----------||
|--------------|

Eliminating all but one of the grandchild forms does not fix the problem.

I could probably write code to work around the problem if there was a way for the grandchild form to know which of the instances it is being loaded as, but as far as I am aware, that isn’t possible.

  • Remove From My Forums
  • Question

  • I have a MS Access 2013 split database that I enhanced with new forms and functionality.
    The new forms, related tables and VBA were developed on a desktop machine (with a local copy of the database backend in order not to impact live data)

    After testing, the new tables where imported into the live production DB (on  a server) and a copy of the new frontend consisting of the existing forms, queries, reports, VBA etc… Combined with the new forms, queries, reports, VBA was linked up to
    the live database.

    Now I am getting «Run-time error ‘2455’ You entered an expression that has an invalid reference to the property Form/Report» errors on form loads for code that accesses the new forms i.e.

    ‘ Hide or show View file button as appropriate
       If (Forms![frmSystemAndWarranties]!sfrmPPP_Warranty![WarrantlyApplicationInvoice].Form.RecordsetClone.RecordCount = 0) Then
           Forms![frmSystemAndWarranties]![sfrmPPP_Warranty]!cmd_ViewFile.Visible = False
       Else
          Forms![frmSystemAndWarranties]![sfrmPPP_Warranty]!cmd_ViewFile.Visible = True
       End If

    or

    With Me![EquipmentList].Form
            .Visible = (.RecordsetClone.RecordCount > 0)
    End With

    If you set a breakpoint and use a debug code to see if the form exits i.e. Print Forms![frmSystemAndWarranties]!sfrmPPP_Warranty![WarrantlyApplicationInvoice].name
    It seems to, because the response is «WarrantlyApplicationInvoice» and the forms exist in the forms list and you can open them in the forms designer.

    A «Compact and repair of the database» does nothing to resolve the issue.

    If I link the desktop development copy to the live database, same errors occur, yet when linked to the local copy of the database backend , everything works.

    Anyone have any ideas as to what the issue is and how to correct it?

    Thanks in advance.

Answers

  • The issues seems to be one of latency when using a LAN based DB backend rather than a local drive DB.

    Even thought the form and it’s subforms exist and I can see them with debug commands, the recordsets for the subforms lake longer to instantiate. So checking the existence of records on those subforms from the parent form was failing giving the
    error. And as usual for MS the error message was not so meaningful, just a generic statement that the reference was invalid.

    To fix the issue, I moved the test for the existence of records to the current event of the subforms and I am setting a flag in the parent form i.e.

        ‘ Set the «EquipList_RecordCount» flag on the parent form
        With Me.Parent!txtEquipList_RecordCount
             .Value = Me.RecordsetClone.RecordCount > 0
        End With

    Then on the parent’s current event, the flag is used to hide/show the subform based on the status of the flag.

    So far, it works like a charm.

    Interesting. Incidentally, you don’t need to use RecordsetClone for this purpose; you can just use the form’s recordset directly:

        .Value = (Me.Recordset.RecordCount > 0)


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    • Marked as answer by

      Wednesday, June 18, 2014 2:39 AM

  • A slightly more elegant solution is to declare a flag

    Private EquipListHasRrecords As Boolean

    and a public sub on the parent form.

    Public Sub SetEquipmentListHasRecords(bStatus)
        EquipListHasRrecords = bStatus
    End Sub

    Then on the subform’s current event call the sub to set the flag.

    Call Me.Parent.SetEquipmentListHasRecords(Me.Recordset.RecordCount > 0)

    The flag is then tested to hide/shot the subform.

    Keeps from cluttering up the parent form with hidden fields.

    Keith

    • Marked as answer by
      George Hua
      Wednesday, June 18, 2014 2:38 AM

  • #1

I have a Switchboard form that gives the visitor several options from which to choose. All work fine except one.

The one in question loads just fine. This form has an unbound combo box used to search the database. When the user selects an option from the combo box the subform is then populated with the information. All of this works fine. The problem arises if the user tries to close Access (not the form, but rather closing out Access). We get a «run-time error 2455: you entered an expression that has an invlid reference to the property form/report». I’ve tried clicking on Debug, but Access closes and I cannot see what is causing the error.

Like I said, the other forms work. If instead the user opens another form from the Switchboard and then closes Access, there are no problems — it closes like it should. The error only occurs for this form and only when Access is being closed, not the form.

Anyone have any ideas how I can trap this or how to stop it?

Thanks.

  • #2

Have you tried to scratch build a new one?

Sometimes thats the only hope :eek:

  • #3

no….one reason is because i don’t know if it is in the way i designed the forms…if it is, then rebuilding would have the same result…

  • #4

Hum…

Maybe you create a copy of the form and start removing bit’s and pcs until the error goes away. Then you’d have a starting point to begin trouble shooting at (?)

  • #5

Is that form «in question» still open when Access tries to close?

Can you close form «in question»without any problems?

  • #6

ghudson said:

Is that form «in question» still open when Access tries to close?

Can you close form «in question»without any problems?

yes, it is still open…if the form is closed everything works fine…if, however, the user tries to close Access all together, that’s when the run-time error occurs. like i said, with the other forms on the switchboard the user can close Access with no problems…..only this one….that’s why i’m baffled.

  • #7

on the main form in question, i have vba code in the «Form_resize()» which lines up the combo box and the subform and corresponding labels….it appears as though it first is trying to resize the forms…could this be what is causing the error? would closing Access cause the form to call up the «Form_Resize()» function? if it is, how would i trap this since i’m closing Access?

just a thought….

  • #8

Something is being triggered when the form is being closed. Check for any code in the forms OnClose or UnLoad events or BeforeUpdate event [etc.]

  • #9

there is code in the Form_Load() and Form_Resize() — both of which are on the main form and not the subform.

the Form_Load() sets the recordsource for the subform. the Form_Resize() sets the size of the subform and positions the combo box based on the users screen size. the only other code is in the combo box AfterUpdate()…here’s that code:

Code:

[B]Private Sub cbo4_AfterUpdate()[/B]
    ' Find the record that matches the control.
    Dim Rs As Object

    Set Rs = Me.Recordset.Clone
    Rs.Find "[type_id] = '" & Me![cbo4] & "'"
    If Not Rs.EOF Then Me.Bookmark = Rs.Bookmark
    
    listing.Form.RecordsetClone.Requery

    listing.Visible = True
[B]End Sub[/B]

  • #10

Can you post a stripped down version of your db? Just the parts that give you the error when you close access with the offending form [and subform] open.

  • #11

i can try…the tables are in mssql and i use access as the frontend….when you export the tables from mssql to access it changes the table names…i’ll see if i can export them and post it here…most likely tomorrow…

  • #12

here are the forms in question (without tables)…maybe from the forms you can determine what is going on….can’t post the tables, sorry…

  • db2.zip

    16.8 KB · Views: 144

  • #13

The forms are not opening because the forms are linked to non existant tables.

You have to post the db with the tables that are feeding the forms. Just delete all of the records in each table and key a couple of dummy records.

  • #14

i was hoping that by looking at the code that goes along with the forms would help….i doubt it has anything to do with the data in the tables…i tried importing the tables but problems arise because i’m using functions that are available via MSSQL and not Access (remember, i’m using Access as the frontend)….thus, even when i go through and change table names from «dbo.whatever» to «whatever», the forms still will not work because of the functions i have used….is it possible at all to look at the forms and the VBA associated with them to decipher what might be causing the problems?

  • #15

The only things I noticed…

The tbl_class_listing form does not have any active code.

The tbl_list_class_type1 form does not have any code that fires when the form is closed.

The Form_Resize() function in the tbl_list_class_type1 is not being called «anywhere».

You are not closing your record set in the Combo4_AfterUpdate() sub. You should end that procedure with Rs = Nothing

Without seeing the db in action that is all that I can offer.

HTH

  • #16

ghudson said:

The only things I noticed…

The tbl_class_listing form does not have any active code.

exactly and it shouldn’t have any…it’s all accomplished from the combobox…

ghudson said:

The tbl_list_class_type1 form does not have any code that fires when the form is closed.

and it shouldn’t….the form that opened it remains open…this is one of the reasons i’m baffled….no code, yet there is a problem…

ghudson said:

The Form_Resize() function in the tbl_list_class_type1 is not being called «anywhere».

not exactly….the form is maximized when loaded…if the user changes this size, thus calling form_resize(), it centers the combobox and adjusts the subform….

ghudson said:

You are not closing your record set in the Combo4_AfterUpdate() sub. You should end that procedure with Rs = Nothing

i’ll look at that, good point….

ghudson said:

Without seeing the db in action that is all that I can offer.

HTH

it does, in a way….you have noticed the same things i’ve noticed…still hasn’t really solved my problem, but at least i know i’m not going crazy….

Понравилась статья? Поделить с друзьями:
  • Access ошибка 2162
  • Access ошибка 2105
  • Access отчет ошибка
  • Access отключить сообщения об ошибках
  • Access номер ошибки 32004