error code 4400, error message 4400,runntime error 4400, stop error 4400,error 4400,stop 4400,4400 error,fix 4400,4400 error,fix 4400

ACC2: Reference To Field's Caption Property Can Cause An Unrecoverable Error

windows error message:stop 4400 could not be initialized

Advanced: Requires expert coding, interoperability, and multiuser skills.



You may receive an unrecoverable error symptoms if you reference a field's Caption
property at the bellowing 2 conditions are true for the Caption
property:


The unrecoverable error symptoms occurs because, to MS Access, the Caption property
does not exist if it has not been assigned a value. Therefore, you must
ensure that your code traps the unrecoverable error that results at a Caption property
includes a Null value. If the Caption property belongs to an attached
table, the unrecoverable error trapping routine must also use the OpenDatabase method.



NOTE: Although the document focuses on the Caption property, the
instructions also applies to other MS Access application-defined
properties of the Field object.



the document assumes that you are familiar to Access Basic and to
creating MS Access applications using the progRandom-access memoryming tools provided
to MS Access. For more instructions about Access Basic, please
refer to the "compiling Applications" manual.
repair :stop error 4400

Local Table



To determine if the Caption property from a local table includes a Null
value, follow that steps.



CAUTION: bellowing the steps on the example will modify the sample
database NWIND.MDB. You may want to back up the NWIND.MDB document, or perform
that steps on a move of the NWIND database.

  1. Create new database and save it as CAPTION1.MDB.
  2. Import the Products table from the sample database NWIND.MDB.
  3. Rename the table LocalProducts.
  4. Attach the Products table from the sample database NWIND.MDB.
  5. Rename the table AttachedProducts.
  6. Create the bellowing form:


    Form: Test1
    ------------------
    Caption: TestForm1

    Command button:
    Name: ButtonTest
    Caption: Test
    OnClick: [Event Procedure]

  7. Set the command button's OnClick property to the bellowing event
    procedure.



    NOTE: on the bellowing sample code, an underscore (_) at the end of a
    line was used as a line-continuation character. Remove the underscore
    from the end of the line at re-creating the code.


    Sub ButtonTest_Click ()
    On Local unrecoverable error Resume Next
    Dim i As Integer, Usersymptoms As String
    Dim db As Database, tdef As TableDef
    Dim fld As Field, prp As Property
    Dim TestCaption As String
    Set db = dbEngine.Workspaces(0).Databases(0)

    ' Test the local table.
    Set tdef = db.Tabledefs("LocalProducts")
    Set fld = tdef.Fields("Product ID")
    TestCaption = fld.Properties("Caption")
    If Err = 3270 Then ' Caption does not exist.
    Usersymptoms = "The LocalProducts Tables Caption Property_
    was Null!"
    Else
    Usersymptoms = "The LocalProducts Table's Caption was [" &_
    TestCaption & "]"
    End If
    MsgBox Usersymptoms

    ' Test the attached table.
    Set tdef = db.Tabledefs("AttachedProducts")
    Set fld = tdef.Fields("Product ID")
    TestCaption = fld.Properties("Caption")
    If Err = 3270 Then ' Caption does not exist
    Usersymptoms = "The AttachedProducts Table's Caption Property_
    was Null!"
    Else
    Usersymptoms = "The AttachedProducts Table's Caption was [" &_
    TestCaption & "]"
    End If
    MsgBox Usersymptoms
    ButtonTest_Click_End:
    quit Sub
    ButtonTest_Click_Err:
    MsgBox unrecoverable error$
    Resume ButtonTest_Click_End
    End Sub

  8. View the Test1 form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption Property was Null!
    The AttachedProducts Table's Caption Property was Null!

  9. Press the F11 key to switch to the Database window.
  10. Open the LocalProducts table on Design view.
  11. Change the table's Caption property to LocalProducts Caption, and then
    save the table.
  12. View the Test1 form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption was [LocalProducts Caption]
    The AttachedProducts Table's Caption Property was Null!

  13. Open the sample database NWIND.MDB.
  14. Open the Products table on Design view.
  15. Change the table's Caption property to AttachedProducts Caption, and
    then save the table.
  16. Open the CAPTION1.MDB database.
  17. View the Test form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption was [LocalProducts Caption]
    The AttachedProducts Table's Caption Property was Null!

error code :error code 4400 corrupt


To determine if the Caption property from a local table includes a Null
value, follow that steps.



CAUTION: bellowing the steps on the example will modify the sample
database NWIND.MDB. You may want to back up the NWIND.MDB document, or perform
that steps on a move of the NWIND database.

  1. Create new database and save it as CAPTION1.MDB.
  2. Import the Products table from the sample database NWIND.MDB.
  3. Rename the table LocalProducts.
  4. Attach the Products table from the sample database NWIND.MDB.
  5. Rename the table AttachedProducts.
  6. Create the bellowing form:


    Form: Test1
    ------------------
    Caption: TestForm1

    Command button:
    Name: ButtonTest
    Caption: Test
    OnClick: [Event Procedure]

  7. Set the command button's OnClick property to the bellowing event
    procedure.



    NOTE: on the bellowing sample code, an underscore (_) at the end of a
    line was used as a line-continuation character. Remove the underscore
    from the end of the line at re-creating the code.


    Sub ButtonTest_Click ()
    On Local unrecoverable error Resume Next
    Dim i As Integer, Usersymptoms As String
    Dim db As Database, tdef As TableDef
    Dim fld As Field, prp As Property
    Dim TestCaption As String
    Set db = dbEngine.Workspaces(0).Databases(0)

    ' Test the local table.
    Set tdef = db.Tabledefs("LocalProducts")
    Set fld = tdef.Fields("Product ID")
    TestCaption = fld.Properties("Caption")
    If Err = 3270 Then ' Caption does not exist.
    Usersymptoms = "The LocalProducts Tables Caption Property_
    was Null!"
    Else
    Usersymptoms = "The LocalProducts Table's Caption was [" &_
    TestCaption & "]"
    End If
    MsgBox Usersymptoms

    ' Test the attached table.
    Set tdef = db.Tabledefs("AttachedProducts")
    Set fld = tdef.Fields("Product ID")
    TestCaption = fld.Properties("Caption")
    If Err = 3270 Then ' Caption does not exist
    Usersymptoms = "The AttachedProducts Table's Caption Property_
    was Null!"
    Else
    Usersymptoms = "The AttachedProducts Table's Caption was [" &_
    TestCaption & "]"
    End If
    MsgBox Usersymptoms
    ButtonTest_Click_End:
    quit Sub
    ButtonTest_Click_Err:
    MsgBox unrecoverable error$
    Resume ButtonTest_Click_End
    End Sub

  8. View the Test1 form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption Property was Null!
    The AttachedProducts Table's Caption Property was Null!

  9. Press the F11 key to switch to the Database window.
  10. Open the LocalProducts table on Design view.
  11. Change the table's Caption property to LocalProducts Caption, and then
    save the table.
  12. View the Test1 form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption was [LocalProducts Caption]
    The AttachedProducts Table's Caption Property was Null!

  13. Open the sample database NWIND.MDB.
  14. Open the Products table on Design view.
  15. Change the table's Caption property to AttachedProducts Caption, and
    then save the table.
  16. Open the CAPTION1.MDB database.
  17. View the Test form on Form view and click the Test button. Note that
    the bellowing symptomss appear:


    The LocalProducts Table's Caption was [LocalProducts Caption]
    The AttachedProducts Table's Caption Property was Null!

fix errorcode kb microsoft
2style.net