[AccessD] Query SQL

Gustav Brock gustav at cactus.dk
Sun Jun 29 01:27:42 CDT 2003


Hi John

> .. the FE has a switchboard that opens when the FE opens.
> I need a way to open the FE without the switchboard opening.

What strange thing causes this switchboard to open?

I don't know of other options than either to open it from an autoexec
macro or setting it to open in the start options.

Anyway, this works for me:

<code>

  Dim wks As DAO.Workspace
  Dim dbs As DAO.Database
  Dim fld As DAO.Field
  
  Set wks = DBEngine(0)
  Set dbs = wks.OpenDatabase("x:\path\any.mdb")
  
  Debug.Print dbs.QueryDefs.Count
  
  For Each fld In dbs.QueryDefs(0).Fields
    Debug.Print fld.Type, fld.Name
  Next
  
  dbs.Close
  wks.Close
  
  Set fld = Nothing
  Set dbs = Nothing
  Set wks = Nothing

</code>

Neither the startup form or the autoexec macro is launched by this.

/gustav



More information about the AccessD mailing list