Make MDE problem

redneckgeek

New member
Local time
Today, 14:40
Joined
Dec 28, 2007
Messages
464
Hello all,

I have a front end/back end app in AccessXP/Sql Server. I have a master version of the front end on my pc, and each user has a copy on their pc.
Everything works fine. I wanted to go the last step in securing the project, so I converted to an MDE. Now, on some of the other PC's, any field in a form that has "NOW()" as the default value (unbound fields) displays the #NAME? error.

Any idea why it would work fine in a .MDB, but not in an .MDE?

Thanks
Mark
 
The only thing it sounds like to me is that you may have an incorrect linked table or query to the back-end since that error would be displaying when the available fields from the source aren't existing.
 
It sounds to me like you have a reference issue on some of the other machines.
 
You can refresh the references automatically by using this in a standard module and then calling CheckRefs via an AutoExec macro:

Code:
Function CheckRefs()
   Dim db As DAO.Database, rs As DAO.Recordset
   Dim x
   Set db = CurrentDb

   On Error Resume Next

   ' Run the query qryTestRefs you created and trap for an error.
   Set rs = db.OpenRecordset("qryTestRefs", dbOpenDynaset)

    If Err.Number <> 0 Then
      MsgBox "This application has detected newer versions " _
             & "of required files on your computer. " _
             & "It may take several minutes to recompile " _
             & "this application."
      Err.Clear
      FixUpRefs
   End If   
   

End Function

Sub FixUpRefs()
    Dim loRef As Access.Reference
    Dim intCount As Integer
    Dim intX As Integer
    Dim blnBroke As Boolean
    Dim strPath As String

    On Error Resume Next

    'Count the number of references in the database
    intCount = Access.References.Count
  
    'Loop through each reference in the database
    'and determine if the reference is broken.
    'If it is broken, remove the Reference and add it back.
    For intX = intCount To 1 Step -1
      Set loRef = Access.References(intX)
      With loRef
        blnBroke = .IsBroken
        If blnBroke = True Or Err <> 0 Then
          strPath = .FullPath
          With Access.References
            .Remove loRef
            .AddFromFile strPath
          End With
        End If
       End With
    Next
    
  Set loRef = Nothing
  
  ' Call a hidden SysCmd to automatically compile/save all modules.
  Call SysCmd(504, 16483)
End Sub
 
I thought it was a reference issue, also - but then, wouldn't I have the same issue regardless of if it was MDB or MDE?

I checked which my machine against the others, and they are all using the
same libraries and same versions. I even checked the paths to those libraries, to make sure they were the same.
 
This may sound foolish but do you have MS Word installed on the machine that you are receiving the error message? If you do not, I have had the same problem and I think that I have traced it back to a file that is missing. The file is MSWORD.OLB and it should be located in the C:\program files\microsoft office\office11 folder. When I add this file to a machine that does not have MS Word, the date problem goes away. Just a thought.
 
' Run the query qryTestRefs you created and trap for an error.
Set rs = db.OpenRecordset("qryTestRefs", dbOpenDynaset)
[/code]

In your code what exactly is this line doing please and what needs to be in this query.? What table is it queying?
 
In your code what exactly is this line doing please and what needs to be in this query.? What table is it queying?

Go here for the entire KB Article.


welcometoawf.png
 

Users who are viewing this thread

Back
Top Bottom