John Colby
jcolby at colbyconsulting.com
Sun Jun 29 07:51:30 CDT 2003
Gustav,
That works great, thanks. I was using opencurrentdatabase instead of
opendatabase.
You da man!
John W. Colby
www.colbyconsulting.com
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Gustav Brock
Sent: Sunday, June 29, 2003 2:28 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Query SQL
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
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com