MICROSOFT OFFICE ACCESS HAS ENCOUNTERED A PROBLEM.....

D

Donna

....and needs to close. .... "

Every time I try to make a change in design mode, on ANY form, I get this
message. I have performed the "detect and repair" and also the "compact and
repair" about 10 times in the last 2 days. I used this database on Friday
and all worked fine. It is not limited to one particular form. I can use
the tables, queries and reports with no problem. I have tried creating a new
database and selectively importing from the original. If i try to import a
form from the original, I also get the message. Help!
 
P

Pieter Wijnen

try to decompile the database and /or
application.saveastext & application.LoadFromText

Public Sub DocDatabase(Optional ByVal Path As String = "C:\Temp\")
'====================================================================
' Name: DocDatabase
' Purpose: Documents the database to a series of text files
'
' Author: Arvin Meyer
' Date: June 02, 1999
' Comment: Uses the undocumented [Application.SaveAsText] syntax
' To reload use the syntax [Application.LoadFromText]
' Modified to set a reference to DAO 8/22/2005
' Modifed by Pieter Wijnen 2006-02-04:
' Added Path as Parameter, Split By Container, MakeDir, Fully Qualifed
References, Removed redundant doc from Next
'====================================================================

Dim dbs As DAO.Database
Dim Cnt As DAO.Container
Dim Doc As DAO.Document
Dim Qdef As DAO.QueryDef

Set dbs = Access.CurrentDb() ' use CurrentDb() to refresh Collections
On Error GoTo Err_DocDatabase

VBA.MkDir (Path)
Path = Path & VBA.Dir(dbs.Name)
VBA.MkDir (Path)

Set Cnt = dbs.Containers("Forms")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acForm, Doc.Name, Path
& "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc

Set Cnt = dbs.Containers("Reports")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acReport, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc

Set Cnt = dbs.Containers("Scripts")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acMacro, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc

Set Cnt = dbs.Containers("Modules")
Cnt.Documents.Refresh
VBA.MkDir (Path & "\" & Cnt.Name)
For Each Doc In Cnt.Documents
Access.Application.SaveAsText Access.AcObjectType.acModule, Doc.Name,
Path & "\" & Cnt.Name & "\" & Doc.Name & ".txt"
Next 'doc

VBA.MkDir (Path & "\" & "Queries")
dbs.QueryDefs.Refresh
For Each Qdef In dbs.QueryDefs
Access.Application.SaveAsText Access.AcObjectType.acQuery, Qdef.Name,
Path & "\" & Cnt.Name & "\" & Qdef.Name & ".txt"
Next 'i

Exit_DocDatabase:
Set Cnt = Nothing
Set dbs = Nothing
Exit Sub

Err_DocDatabase:
With VBA.Err
Select Case .Number
Case 75 'MkDir Fails
Resume Next
Case Else
VBA.MsgBox "(" & .Number & ") " & .Description,
VBA.VbMsgBoxStyle.vbInformation, .Source
Resume Exit_DocDatabase
End Select
End With
End Sub

HtH

Pieter
 
D

Donna

I have installed SP3. I found other posts that id this symptom as a new bug
for the SP3. Has a fix been provided yet? I can try this but others have
noted that this did not work and it had something to do with having more than
10 fields in a table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top