By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,335 Members | 2,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,335 IT Pros & Developers. It's quick & easy.

Make MDE From MDE

P: n/a
I'm using the following code to create mde from mdb.
It runs OK for 3 of my applications, but fails (without an error) for a
fourth.

On Error GoTo ErrorBackupProgram
strCurFile = "E:\dpc manager 10\dpcman10.mdb"
strMDE = "E:\dpc manager 10\dpcman10.mde"

Set app = New Access.Application
app.SysCmd 603, strCurFile, strMDE
app.Quit

MsgBox "MDE Created.", 48

CloseFunction:
On Error Resume Next
Set app = Nothing
app.Quit
Exit Function

ErrorBackupProgram:
MsgBox "Error: " & Error$ & " Line : " & Erl
Beep
Resume CloseFunction

The fourth app is 24MB, and the others are 6MB or less. Could the size be an
issue?
Any ideas on how to trap the error? Standard error code doesn't seem to
work.
Bob Darlington
Brisbane
Sep 17 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Can you create one manually? Or are there references or compile problems in
that db.
-Tom.
"Bob Darlington" <bo*@dpcmanAX.com.auwrote in message
news:46**********************@news.optusnet.com.au ...
I'm using the following code to create mde from mdb.
It runs OK for 3 of my applications, but fails (without an error) for a
fourth.

On Error GoTo ErrorBackupProgram
strCurFile = "E:\dpc manager 10\dpcman10.mdb"
strMDE = "E:\dpc manager 10\dpcman10.mde"

Set app = New Access.Application
app.SysCmd 603, strCurFile, strMDE
app.Quit

MsgBox "MDE Created.", 48

CloseFunction:
On Error Resume Next
Set app = Nothing
app.Quit
Exit Function

ErrorBackupProgram:
MsgBox "Error: " & Error$ & " Line : " & Erl
Beep
Resume CloseFunction

The fourth app is 24MB, and the others are 6MB or less. Could the size be
an issue?
Any ideas on how to trap the error? Standard error code doesn't seem to
work.
Bob Darlington
Brisbane

Sep 18 '07 #2

P: n/a
Will the local code "know" what the external app is doing (making an
mde)? I don't know but if it doesn't it may not wait until the
external app is done before it issues the app.quit directive.
I'd try omitting that (app.quit). If that worked (0.000003% chance -
my guess) I'd put in a little sleep routine before the quit, or I'd
loop through a check of the existence of the mde before quitting.
As for the error, surely this is an error of the external app. Will
our current VB have any idea what that is?

Sep 18 '07 #3

P: n/a
Yes Tom. No problem manually.

--
Bob Darlington
Brisbane
"Tom van Stiphout" <tv******************@kinetik-it.comwrote in message
news:13*************@corp.supernews.com...
Can you create one manually? Or are there references or compile problems
in that db.
-Tom.
"Bob Darlington" <bo*@dpcmanAX.com.auwrote in message
news:46**********************@news.optusnet.com.au ...
>I'm using the following code to create mde from mdb.
It runs OK for 3 of my applications, but fails (without an error) for a
fourth.

On Error GoTo ErrorBackupProgram
strCurFile = "E:\dpc manager 10\dpcman10.mdb"
strMDE = "E:\dpc manager 10\dpcman10.mde"

Set app = New Access.Application
app.SysCmd 603, strCurFile, strMDE
app.Quit

MsgBox "MDE Created.", 48

CloseFunction:
On Error Resume Next
Set app = Nothing
app.Quit
Exit Function

ErrorBackupProgram:
MsgBox "Error: " & Error$ & " Line : " & Erl
Beep
Resume CloseFunction

The fourth app is 24MB, and the others are 6MB or less. Could the size be
an issue?
Any ideas on how to trap the error? Standard error code doesn't seem to
work.
Bob Darlington
Brisbane


Sep 18 '07 #4

P: n/a
On Tue, 18 Sep 2007 11:04:46 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.auwrote:

Is it possible you have more than one version of Access installed, and
it's using a different version than you were hoping for? Use:
app.Visible = True
to check it out.

-Tom.

>Yes Tom. No problem manually.
Sep 18 '07 #5

P: n/a
Thanks Tom.
I have got 2002 and 2003 installed, but all my work is being done in 2002.
The other 3 programs create the mde without a problem (using identical
code).

--
Bob Darlington
Brisbane
"Tom van Stiphout" <no*************@cox.netwrote in message
news:0j********************************@4ax.com...
On Tue, 18 Sep 2007 11:04:46 +1000, "Bob Darlington"
<bo*@dpcmanAX.com.auwrote:

Is it possible you have more than one version of Access installed, and
it's using a different version than you were hoping for? Use:
app.Visible = True
to check it out.

-Tom.

>>Yes Tom. No problem manually.

Sep 18 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.