Betreft: [AccessD] mdb speed

marcel.vreuls at achmea.nl marcel.vreuls at achmea.nl
Mon Oct 20 08:29:09 CDT 2003


Kath,

Thanks for your code. I found this one (without the code) and a solution to
keep a recordset permanent open to prevent a lock of the LDB file.

Marcel







"Kath Pelletti" <SDSSoftware at optusnet.com.au>@databaseadvisors.com op
20-10-2003 14:55:45

Antwoord aub aan Access Developers discussion and problem solving
      <accessd at databaseadvisors.com>

Verzonden door:     accessd-bounces at databaseadvisors.com


Aan:  <AccessD at databaseadvisors.com>
cc:

Onderwerp:     [AccessD] mdb speed


I deleted the message from marcel(?) too fast - but Marcel here is some
code previously posted to the list to turn off all subdatasheets in your
tables, ie. to set the name of the subdatasheet name to "None".
(Sorry - can't credit original author...)

Marcel - there have been some really good posts to the list on speed and
performance issues - maybe a search for 'speed' in the archives would be of
some help to you?

Kath

Function TurnOffSubDataSheets()
  Dim MyDB As DAO.Database
  Dim MyProperty As DAO.Property

  Dim propName As String
  Dim PropType As Integer
  Dim propVal As String

  Dim strS As String

  Set MyDB = CurrentDb

  propName = "SubDataSheetName"
  PropType = 10
  propVal = "[NONE]"

  On Error Resume Next

  For I = 0 To MyDB.TableDefs.Count - 1

     If (MyDB.TableDefs(I).Attributes And dbSystemObject) = 0 Then

        If MyDB.TableDefs(I).Properties(propName).Value <> propVal Then
           MyDB.TableDefs(I).Properties(propName).Value = propVal
           intChangedTables = intChangedTables + 1
        End If

        If Err.Number = 3270 Then
           Set MyProperty = MyDB.TableDefs(I).CreateProperty(propName)
           MyProperty.Type = PropType
           MyProperty.Value = propVal
           MyDB.TableDefs(I).Properties.Append MyProperty
        Else
           If Err.Number <> 0 Then
              MsgBox "Error: " & Err.Number & " on Table " _
              & MyDB.TableDefs(I).Name & "."
              MyDB.Close
              Exit Function
           End If
        End If

     End If
  Next I

MsgBox "The " & propName & _
" value for all non-system tables has been updated to " & propVal & "."

MyDB.Close

End Function




Kath Pelletti
Software Design & Solutions Pty Ltd.
Ph: 9505-6714
Fax: 9505-6430
sdssoftware at optusnet.com.au
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


*****************************************************************
Dit bericht is bij binnenkomst gecontroleerd op de
aanwezigheid van virussen. Er zijn geen (bekende)
virussen gevonden.  Active
*****************************************************************






********************* DISCLAIMER *********************
De informatie in dit e-mail bericht is uitsluitend
bestemd voor de geadresseerde. Verstrekking aan
en gebruik door anderen is niet toegestaan.
Door de electronische verzending van het bericht
kunnen er geen rechten worden ontleend aan de
informatie.
************************************************************



More information about the AccessD mailing list