[AccessD] Export/Import all Objects
Dan Waters
df.waters at outlook.com
Fri Jul 28 14:56:02 CDT 2017
Hi Rocky,
It's been years since I looked into this file ...
In the module named DeCorrupter Code change the Function named DestinationFileAlreadyExists to this:
'---------------------------------------------------------------------------
Private Function DestinationFileAlreadyExists() As Boolean
1 On Error GoTo EH
Dim fso As Object
Dim stgPrompt As String
Dim fil As File
2 Set fso = CreateObject("Scripting.FileSystemObject")
3 If fso.FileExists(MstgDestinationFullPath) Then
4 If fso.FileExists(Replace(MstgDestinationFullPath, ".mdb", ".ldb")) Then
'-- If an .ldb file exists then the ...TEXT.mdb file is probably open
5 stgPrompt = "The file " & MstgDestinationFullPath & " appears to be open." _
& vbNewLine & vbNewLine _
& "You must close it before continuing."
6 MsgBox stgPrompt, vbCritical + vbOKOnly, "Destination File Is Open"
7 DestinationFileAlreadyExists = True
8 Exit Function
9 ElseIf fso.FileExists(Replace(MstgDestinationFullPath, ".accdb", ".laccdb")) Then
'-- If an .laccdb file exists then the ...TEXT.accdb file is probably open
10 stgPrompt = "The file " & MstgDestinationFullPath & " appears to be open." _
& vbNewLine & vbNewLine _
& "You must close it before continuing."
11 MsgBox stgPrompt, vbCritical + vbOKOnly, "Destination File Is Open"
12 DestinationFileAlreadyExists = True
13 Exit Function
14 Else
15 Set fil = fso.GetFile(MstgDestinationFullPath)
16 fil.Attributes = 0
17 fso.DeleteFile MstgDestinationFullPath, True
18 End If
19 End If
20 Set fso = Nothing
21 Exit Function
EH:
22 DoCmd.Hourglass False
23 stgPrompt = "ERROR: DestinationFileAlreadyExists" & vbNewLine & vbNewLine _
& "Line: " & Erl & vbNewLine _
& "Number: " & Err.Number & vbNewLine _
& "Description: " & Err.Description
24 MsgBox stgPrompt, vbExclamation + vbOKOnly, GstgProcessName & " Error"
25 Stop
End Function
'---------------------------------------------------------------------------
I hope this will solve it.
Good Luck!
Dan
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: July 27, 2017 19:57
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Export/Import all Objects
I don't think so. Doesn't appear to be. It gets created when I start the export, yes?
R
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Thursday, July 27, 2017 12:51 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Export/Import all Objects
Is the file actually open?
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: July 27, 2017 14:15
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Export/Import all Objects
I did but ran into a bug -
The file C:\Clients\AHI\AHI_FE-1229-DecorrupterTEXT.accdb appears to be open.
You must close it before continuing.
What am I doing wrong?
TIA
Rocky
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Thursday, July 27, 2017 12:03 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Export/Import all Objects
Hi Rocky,
Looks like you can download it from http://www.camcopng.com/decorrupter.
Enjoy!
Dan
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: July 27, 2017 12:32
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Export/Import all Objects
Woo-hoo! Thank you. Please send to rocky.smolin at bchacc.com.
Best,
R
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Thursday, July 27, 2017 9:34 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Export/Import all Objects
I do and it's now called the DeCorrupter! But someone put a copy on their website to make it easily available for downloading and I don't remember who that was.
If anyone would like a copy let me know and I'll send it off-line.
Dan
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jack drawbridge
Sent: July 27, 2017 10:06
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Export/Import all Objects
Rocky,
I'm not positive, but , as I recall, Dan Waters had a routine (originally called EatBloat or similar) that would do a save as text of all objects and had option to do a Load From text. I repeat I'm not positive.
Good luck.
On Thu, Jul 27, 2017 at 10:21 AM, Rocky Smolin <rockysmolin at bchacc.com>
wrote:
> Dear List:
>
>
>
> I have an application where the forms are all hosed up on screen resizing.
> I
> tried Peter's Shrinker Stretcher but it didn't solve the problem.
>
>
>
> I remember a thread on the list in the past about exporting all the
> objects to text and then reimporting them into a new database as a way
> to solve some corruption problems. I'd like to try that but can't
> remember exactly how to go about it.
>
>
>
> Can someone point me in the right direction for that?
>
>
>
> MTIA
>
>
>
>
>
> Rocky Smolin
>
> Beach Access Software
>
> 760-683-5777
>
> <http://www.bchacc.com> www.bchacc.com
>
> <http://www.e-z-mrp.com> www.e-z-mrp.com
>
> Skype: rocky.smolin
>
>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list