Access ошибка 3201

Icon Ex Номер ошибки: Ошибка 3201
Название ошибки: Microsoft Access Error 3201
Описание ошибки: You cannot add or change a record because a related record is required in table ‘|’.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Access
Относится к: Windows XP, Vista, 7, 8, 10, 11

Сводка «Microsoft Access Error 3201

Это наиболее распространенное условие «Microsoft Access Error 3201», известное как ошибка времени выполнения (ошибка). Разработчики, такие как Microsoft Corporation, обычно проходят через несколько контрольных точек перед запуском программного обеспечения, такого как Microsoft Access. Тем не менее, возможно, что иногда ошибки, такие как ошибка 3201, не устранены, даже на этом этапе.

Пользователи Microsoft Access могут столкнуться с сообщением об ошибке после выполнения программы, например «You cannot add or change a record because a related record is required in table ‘|’.». После возникновения ошибки 3201 пользователь программного обеспечения имеет возможность сообщить разработчику об этой проблеме. Затем Microsoft Corporation нужно будет исправить эти ошибки в главном исходном коде и предоставить модифицированную версию для загрузки. Эта ситуация происходит из-за обновления программного обеспечения Microsoft Access является одним из решений ошибок 3201 ошибок и других проблем.

Почему происходит ошибка времени выполнения 3201?

Сбой во время запуска Microsoft Access или во время выполнения, как правило, когда вы столкнетесь с «Microsoft Access Error 3201». Проанализируем некоторые из наиболее распространенных причин ошибок ошибки 3201 во время выполнения:

Ошибка 3201 Crash — Номер ошибки вызовет блокировка системы компьютера, препятствуя использованию программы. Обычно это происходит, когда Microsoft Access не может обработать данные в удовлетворительной форме и поэтому не может получить ожидаемый результат.

Утечка памяти «Microsoft Access Error 3201» — Когда Microsoft Access обнаруживает утечку памяти, операционная система постепенно работает медленно, поскольку она истощает системные ресурсы. Это может быть вызвано неправильной конфигурацией программного обеспечения Microsoft Corporation или когда одна команда запускает цикл, который не может быть завершен.

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

Основные причины Microsoft Corporation ошибок, связанных с файлом Microsoft Access Error 3201, включают отсутствие или повреждение файла, или, в некоторых случаях, заражение связанного Microsoft Access вредоносным ПО в прошлом или настоящем. Возникновение подобных проблем является раздражающим фактором, однако их легко устранить, заменив файл Microsoft Corporation, из-за которого возникает проблема. В качестве последней меры мы рекомендуем использовать очиститель реестра для исправления всех недопустимых Microsoft Access Error 3201, расширений файлов Microsoft Corporation и других ссылок на пути к файлам, по причине которых может возникать сообщение об ошибке.

Распространенные проблемы Microsoft Access Error 3201

Частичный список ошибок Microsoft Access Error 3201 Microsoft Access:

  • «Ошибка в приложении: Microsoft Access Error 3201»
  • «Недопустимая программа Win32: Microsoft Access Error 3201»
  • «Microsoft Access Error 3201 должен быть закрыт. «
  • «Не удается найти Microsoft Access Error 3201»
  • «Microsoft Access Error 3201 не может быть найден. «
  • «Ошибка запуска программы: Microsoft Access Error 3201.»
  • «Не удается запустить Microsoft Access Error 3201. «
  • «Microsoft Access Error 3201 остановлен. «
  • «Неверный путь к приложению: Microsoft Access Error 3201.»

Проблемы Microsoft Access Microsoft Access Error 3201 возникают при установке, во время работы программного обеспечения, связанного с Microsoft Access Error 3201, во время завершения работы или запуска или менее вероятно во время обновления операционной системы. Документирование проблем Microsoft Access Error 3201 в Microsoft Access является ключевым для определения причины проблем с электронной Windows и сообщения о них в Microsoft Corporation.

Microsoft Access Error 3201 Истоки проблем

Эти проблемы Microsoft Access Error 3201 создаются отсутствующими или поврежденными файлами Microsoft Access Error 3201, недопустимыми записями реестра Microsoft Access или вредоносным программным обеспечением.

Более конкретно, данные ошибки Microsoft Access Error 3201 могут быть вызваны следующими причинами:

  • Поврежденные ключи реестра Windows, связанные с Microsoft Access Error 3201 / Microsoft Access.
  • Загрязненный вирусом и поврежденный Microsoft Access Error 3201.
  • Microsoft Access Error 3201 злонамеренно или ошибочно удален другим программным обеспечением (кроме Microsoft Access).
  • Другое программное обеспечение, конфликтующее с Microsoft Access, Microsoft Access Error 3201 или общими ссылками.
  • Поврежденная установка или загрузка Microsoft Access (Microsoft Access Error 3201).

Продукт Solvusoft

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

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

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

  • Remove From My Forums
  • Question

  • Error 3201: You cannot add or change a record because a related record is required in the table tbl_RevTran_Master

    I’m using Microsoft Access 2010 (14.0.6024.1000) SP1 MSO (14.0.6112.5000)
    I’m using Microsoft Windows 7 Professional Service Pack 1

    I have a Point_of_Sale (POS) system (like an Invoicing system) that is developed and maintained on a Access 2000 computer and full the system is distributed to Access 2000, 2002, 2003 and 2007 users and everything has been working flawlessly for several years.

    I use and front end (C:\App.mdb) and back end (F:\App_Be.mdb) split database technique

    Master/Detail Record are as follows:
    tbl_RevTran_Master, lngRevTranID Primary Key 1 record for each transaction
    tbl_RebTran_Detail, lngRevTranID Forign Key 1 or many record(s) for each transaction

    Relationships on lngRevtranID
    Checked Enforce Referential Integrity
    Checked Cascade Update Related Fields
    Checked Cascade Delete Related Records

    My POS screen has a from Header Detail section for the tbl_RevTran_Master Subform for tbl_RevTran_Detail

    1. When the form is opened the last transaction (Master and Details) that were entered appears on the screen

    2. The form has a Add, Edit, Delete button

    3. When the Add button is clicked

    4. Detail section Form_BeforeInsert is fired

    5. tbl_RevTran_Master AutoNumber lngRevTranID copied into tbl_RevTran_Detail lngRevTranID,

    6. also copies date, user name, etc into the tbl_RevTran_Master record,

    7. and tbl_RevTran_Master record is automatically saved (without code)

    8. DoCmd.GoToRecord , , acNewRec (this clears the SubForm and allows the operator to enter detail records)

    9. Detail line item records are entered as needed The above description is how the system works OK on 2000, 2002, 2003 and 2007 systems

    When operating on a 2010 system:

    First time running the C:\App.mdb under Access 2010, the App seems convert OK, and it compiles clean and the system opens OK

    When I do step 9. Detail line item records are entered as needed, and start entering data, I get the following error message:

    Error 3201: You cannot add or change a record because a related record is required in the table tbl_RevTran_Master

    Bottom line: the tbl_RevTran_Master record is not being saved to disk the instant I move focus to the subform as described in step 7 above

    Keep in mind the same App.mdb & App_Be.mdb system works on 2000, 2002, 2003 and 2007 systems

    How do I force a write of tbl_RevTran_Master before entering
    tbl_RevTran_Detail?

    Please help

    Thanks, John

    11397335

Answers

  • Looks like the problem is solved for now by inserting If Me.Dirty Then Me.Dirty = False

    Code has worked OK for the past 12 years without the command on 2000, 2002, 2003 and 2007 systems

    Is this considered a MS Access bug or a programming error I got away with for 12 years?

    Private Sub Add_Record_Click()

        gloSetValue «FinalizeButtonClicked», «Add»
        gloSetValue «POSButtonClicked», «Add»
        Me.ButtonClicked = gloGetValue(«POSButtonClicked»)
        mstrButtonClicked = «Add»
        cboLookupSequence.SetFocus
        FormState («Unlocked») ‘ Locked or Unlocked Me.strOwnerName.Locked = False
        ControlState («Edit») ‘ Normal or Edit Me.strOwnerName.Enabled = True

        strLookupCriteria = Null
        DoCmd.GoToRecord , , acNewRec

        Me.strProfileCode = GetPref(«Profile Code») ‘ this forces autonumber in master record tbl_RevTran_Master

        ‘ the following command solved the problem
        If Me.Dirty Then Me.Dirty = False

        Me.frm_POS_Detail.SetFocus
        Me.frm_POS_Detail.Form.strTranDesc.SetFocus
        Me.frm_POS_Detail.Form.strTranDesc = Null
        Me.frm_POS_Detail.Form.strTranCode2.SetFocus

    End Sub

    • Marked as answer by

      Monday, August 6, 2012 7:31 PM

  • Remove From My Forums
  • Question

  • I am using the following code & getting error 3201 how I get rid of this

         Set rs = db.OpenRecordset(«tblOrders», dbOpenDynaset)
        Set rs1 = db.OpenRecordset(«tblOrder Details», dbOpenDynaset)
        Set db = CurrentDb

       
        rs.AddNew
        rs!CustomerCode = Me.CmbCustomer
        rs!EmpID = Me.EmpID
        rs!InvoiceNumber = «SO — » & Me.SalesOrderNo
        rs!InvoiceDate = Me.SalesOrderDate
        rs.Update

       
        rs1.AddNew
        rs1!InventoryCode = Me.SalesOrderSubform.Form!InventoryCode
        rs1!Quantity = Me.SalesOrderSubform.Form!Quantity
        rs1!Discount = Me.SalesOrderSubform.Form!Discount
        rs1!Rate = Me.SalesOrderSubform.Form!Rate
        rs1.Update     rs.Close
        rs1.Close
        db.Close

    tblOrders & tblOrder Details have referential integrity on the field OrderID (AutoNumber)

    Thanks & Regards,

Answers

  • Hi

    I think you are getting this error because there is no value being given to the OrderID field in tblOrder Detail.

    You could try the following code (Not Tested):

        Dim intOrdID as integer

        Set rs = db.OpenRecordset(«tblOrders», dbOpenDynaset)
        Set rs1 = db.OpenRecordset(«tblOrder Details», dbOpenDynaset)
        Set db = CurrentDb

       
        rs.AddNew
        rs!CustomerCode = Me.CmbCustomer
        rs!EmpID = Me.EmpID
        rs!InvoiceNumber = «SO — » & Me.SalesOrderNo
        rs!InvoiceDate = Me.SalesOrderDate

        intOrdID = rs!OrderID

        rs.Update

       
        rs1.AddNew
        rs1!InventoryCode = Me.SalesOrderSubform.Form!InventoryCode
        rs1!Quantity = Me.SalesOrderSubform.Form!Quantity
        rs1!Discount = Me.SalesOrderSubform.Form!Discount
        rs1!Rate = Me.SalesOrderSubform.Form!Rate

        rs1!OrderID = intOrdID

        rs1.Update     rs.Close
        rs1.Close
        db.Close


    Bob Fitz BizSoftware

    • Marked as answer by

      Thursday, December 30, 2010 9:31 AM

Search code, repositories, users, issues, pull requests…

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

  1. Recordset not found Error 3201

    I think I am getting screwed up here with using 2 recordsets. I am getting a Runtime error ‘3201’ no current record

    Table.[Horse_Blanket] is blank but does have the Field.[Visio ID]
    Table.[Data] has 7K records in it.

    I am attempting to take information from Data in 2 fields, manipulating it and adding it to Horse_blanket table. If I use HB.AddNew, it will hang up on HB.MoveNext with the same error.

    If I remove HB.Edit and HB.MoveNext it will run record 1 until rS.EOF, even though I have R set from 1 to 5.

    Code:

    Set dbs = CurrentDb()
    

    Set rS = CurrentDb.OpenRecordset("Data") ' Origin Table

    Set HB = CurrentDb.OpenRecordset("Horse_Blanket") ' Destination Table

    R = 1 Do While Not rS.EOF And HB.EOF For R = R To 5 'Last_Row_Num If rS![Row Type] = "FE" Or rS![Equip HB Name] = "." Then StrVisio = rS![unique_id] ElseIf rS![Row Type] = "Plat" Then StrVisio = rS![Parent Node ID] & "-" & rS![Platform_ID] End If Next HB.Edit ' Here is where I get the error. HB![Visio ID] = StrVisio HB.Update HB.MoveNext rS.MoveNext Loop


  2. theres no need for code.
    this can be accomplished with a single update query.


  3. you make the EOF BOF tests on the same domain (table/query) not on 2 different ones and the logical operator «and» should be in parentheses. You are also moving 5 times through the loop, likely changing the variable values without doing anything. Will study a bit more because there’s likely other issues.

    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.


  4. I have gotten it to wotk:

    Code:

    Do While Not rS.EOF And HB.EOF
                
                If rS![Row Type] = "FE" Or rS![Equip HB Name] = "." Then
                    StrVisio = rS![unique_id]
                    StrPlat = "Soldier"
                ElseIf rS![Row Type] = "Plat" Then
                    StrVisio = rS![Parent Node ID] & "-" & rS![Platform_ID]
                    StrPlat = rS![Equip HB Name]
                End If
                
                If IsNull(rS![Role / FE / Node Name]) Then
                        StrRole = ";"
                Else: StrRole = rS![Role / FE / Node Name]
                End If
                
                If IsNull(rS![Bumper # / Plat ID]) Or rS![Bumper # / Plat ID] = "" Then
                StrBump = ";;"
                Else: StrBump = rS![Bumper # / Plat ID] & ";;"
                End If
            
                    StrBumpRole = StrRole & " " & StrBump
        HB.AddNew
        HB![Visio ID] = RTrim([StrVisio])
        HB![BN] = rS![Unit]
        HB![CO] = rS![TOE Title]
        HB![PLT/SEC] = rS![Para Desc]
        HB![Role & Bumper #] = Trim(StrBumpRole)
        HB![Platform System] = Trim(StrPlat)
        HB.Update
        rS.MoveNext
    Loop

    I used this to make the table and columns:

    Code:

    dbs.Execute "CREATE TABLE Horse_Blanket ([Visio ID] CHAR(25), [BN] CHAR(85), [CO] Char (85), [PLT/SEC] Char(85), [Role & Bumper #] Char(85), [Platform System] Char(95));"
    C = 1
        For C = C To (Last_Col_Num - 5) 'Adds 40 columns - Equip 1 to Equip 40
            DoCmd.RunSQL "ALTER TABLE Horse_Blanket Add " & "[Equip " & C & "] text;"
        Next C

    The issue I have is when I open the HB table all the data has spaces behind the transferred data. I tried Trim & Rtrim.

    Ranman,
    I know, but I was trying to get it all VBA

    I can use: DoCmd.OpenQuery «qryConversion»\

    Code:

    SELECT IIf([Row Type]="Plat",[Parent Node ID] & "-" & [Platform_ID],[unique_id]) AS [Visio ID], Data.Unit AS BN, Data.[TOE Title] AS CO, Data.[Para Desc] AS [PLT/SEC], IIf(IsNull([Role / FE / Node Name]),";",[Role / FE / Node Name]) & IIf(IsNull([Bumper # / Plat ID]) Or [Bumper # / Plat ID]="",";;"," " & [Bumper # / Plat ID] & ";;") AS [Role & Bumper#], IIf([Row Type]="FE","Soldier",IIf([Row Type]="Plat",[Equip HB Name])) AS [Platform System] INTO Horse_Blanket
    FROM Data
    WHERE (((IIf([Row Type]="FE","Soldier",IIf([Row Type]="Plat",[Equip HB Name])))<>"") AND ((Data.[Row Type])<>"TOE" And (Data.[Row Type])<>"PH"));

    and

    Code:

    C = 1
        For C = C To (Last_Col_Num - 5) 'Adds 40 columns - Equip 1 to Equip 40
            DoCmd.RunSQL "ALTER TABLE Horse_Blanket Add " & "[Equip " & C & "] text;"
        Next C

  5. CHAR creates fixed-width fields. Try TEXT(xx) instead, with xx being the desired length.


  6. Thanks Pbaldy Will try

    edited

    Worked

    Thanks


Понравилась статья? Поделить с друзьями:
  • Access ошибка 3167
  • Access ошибка 3163
  • Acronis ошибка 0x0095000d
  • Acronis код ошибки 61 модуль 309
  • Acronis true image ошибка файловой системы