[AccessD] Export/Import all Objects

Rocky Smolin rockysmolin at bchacc.com
Wed Aug 2 10:06:06 CDT 2017


OK - truth in programming: I found out that the cause of the problem was not
corruption but using tabbed documents.

However, the decorrupter led me to this discovery so you're still in for the
double martini.

When I ran the decorrupter it turned off tabbed documents.  I like tabbed
documents - makes it easy to navigate among several open forms/reports.  

When I turned them back on, the resizing problem reappeared. 

So the takeaway - if you are using the ADH form resizing code from the 2003
ADH in A2010 (or later? Probably), tabbed documents will hose the resizing. 

So I'll just leave them off.  However, now I have the problem of switching
to other open forms.  In A2003 this was easy - Windows in the menu at the
top dropped down a list of open windows. Is there anything similar in A2010
- or some other way to navigate among open forms without tabbed documents?

r
-----Original Message-----
From: Rocky Smolin [mailto:rockysmolin at bchacc.com] 
Sent: Tuesday, August 01, 2017 9:11 AM
To: 'Rocky Smolin'
Subject: RE: [AccessD] Export/Import all Objects

It's a double!! You have saved my bacon!!

Thank you.

R


-----Original Message-----
From: Rocky Smolin [mailto:rockysmolin at bchacc.com]
Sent: Tuesday, August 01, 2017 8:20 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Export/Import all Objects

Holy Code Cleaners, Batman! It appears to have worked.  Now I'll try it on a
second accdb that's really really hosed up. You're already in for one
martini.  Stand by for a double.

R


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Rocky Smolin
Sent: Tuesday, August 01, 2017 8:16 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Export/Import all Objects

Dan:

I changed

4             If fso.FileExists(Replace(MstgDestinationFullPath, ".mdb",
".ldb")) Then
To

4             If fso.FileExists(Replace(MstgDestinationFullPath, ".accdb",
".laccdb")) Then

And that made it run.  I'm decorrupting an accdb file.

Still have to test the results.


Rocky Smolin
Beach Access Software
760-683-5777
www.bchacc.com
www.e-z-mrp.com
Skype: rocky.smolin
 


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan
Waters
Sent: Friday, July 28, 2017 12:56 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Export/Import all Objects

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

--
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