Question : The command or action 'quit' isn't available now

Access 2000 running on Small Business Server 2003 premium fully patched.

The Access database is an adp so it's connected to a SQL server database.
The Access database quits with the error:

The command or action 'quit' isn't available now.

What does this mean?   The code below comes from the database.  Function fnMain just runs a function and then the Access database should quit so it closes.  This has worked in the past.  The database is not flagged as read only.

If there is an alternate command besides 'quit' to get the database to close, please let me know.

Suggestions?

============= code ====================
=====================================
Public Function fnMain() As Boolean
  Dim bolFlag As Boolean
  Dim varMsg As Variant
  Dim strTest As String
 
  On Error GoTo fnMain_ERR
  fnMain = True 'Assume everything ok
 
  Call subFeedDate
 
  DoCmd.Quit acQuitSaveNone
  Exit Function
 
fnMain_ERR:
  If Err = 53 Then
    Resume Next 'Log file was not found so just bypass Kill statement
  Else
    varMsg = MsgBox("Error " & Err & "  Descr: " & Err.Description & " in subMain ", vbOKOnly, "See basProgram")
    fnMain = False
    Stop
    Resume Next
  End If

End Function

Answer : The command or action 'quit' isn't available now

Application.Quit

Dave
Random Solutions  
 
programming4us programming4us