Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't create MDE file in Access 2002 or 2000

Status
Not open for further replies.
May 5, 2000
168
0
0
US
I am trying to save my Access front end as an MDE file (as I have always done in 97).

I get a message Can't create MDE file. (This isn't very helpful!!!)

Help says to convert to an Access 2000 format then create an MDE using the standard Tools/Utilities.

This isn't working either. I get the same message.

Anyone know why this is happening and how I can get it to work?
 
I am not sure but it sounds like you are using access2k and your base is an A97.

Use Tools/Database utilities/Convert to A2K.
If your access is empty it will then open your normal browser window for you to select the file to be converted.
After the convertion you can convert into an mde.
Herman
 
The database is in an Access 2002 format.

I have tried the steps you describe and get the same message.

I also tried creating a new database in Access 2000, then importing everything in from the target database, then using Tools/Database utilities tried to create an MDE file. Same results.

If I had a clue what was causing this failure, maybe I could fix it, but the message is just a general "Can't make MDE file."

Any other suggestions?
 
Looks like a compile error.
In the A2K version of your base goto the VBA window and via debug try a compile.
Let me know what happens.
Herman
 
Chances are there are bugs in the code somewhere. Access won't make an MDE unless it can successfully compile the code, so open the VBA window and select Debug - Compile MyProject. If this works OK (or the Compile Option is greyed out) the MDE creation should work OK.
 
I tried the compile in the debug window.
I got this message. Compile Error, "Sub or function not defined"

Here is the code referred to. The highlighted text was "IsLoaded". Why would this be a problem? The code runs fine in my project


Private Sub cboCity_NotInList(NewData As String, response As Integer)
Dim mbrResponse As VbMsgBoxResult
Dim strMsg As String

strMsg = NewData & _
" isn't an existing City. " & _
"Add a new City?"
mbrResponse = MsgBox(strMsg, _
vbYesNo + vbQuestion, "Invalid City")
Select Case mbrResponse
Case vbYes
DoCmd.OpenForm "frmCity", _
DataMode:=acFormEdit, _
WindowMode:=acDialog, _
OpenArgs:=NewData

' Stop here and wait until the form
' goes away.
If IsLoaded("frmCity") Then
response = acDataErrAdded
DoCmd.Close acForm, "frmCity"
Else
response = acDataErrContinue
End If
Case vbNo
response = acDataErrContinue
End Select
End Sub
 
I figured it out.

Thank you so much for your help!!!!!!!!!!
 
It may be that you have to fully qualify the Isloaded function. i.e. Application.CurrentProject.AllForms("frmCity").IsLoaded then...
 
Looks like you need this function:

Function IsLoaded(MyFormName)
Dim I
IsLoaded = False
For I = 0 To Forms.Count - 1
If Forms(I).FormName = MyFormName Then
IsLoaded = True
Exit Function
End If
Next
End Function
 
comon janerussel, Share your solution so we may all learn from it...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
I think that 2 guys workes really hard to get you on the right track, one of them, if not the 2 deserves a star, dont you ;-)
 
Yes they deserve a star.

I did not fully qualify my function as you suggested. But I never would have figured this out if I didn't compile the code so that the debugger went to the error.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top