Results 1 to 3 of 3
  1. #1
    djblois is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2018
    Posts
    6

    Turning off subdatasheet view for SQL Linked Tables in Access


    I know it is recommended to turn off subdatasheet view on tables to speed up access to tables. however, SQL linked tables also have that feature on but do not allow you to adjust them. Is there any way to turn it off for these tables?

    Microsoft Access Tip: Set Table Subdatasheet Name Property to [None], or explicitly specify the name. (fmsinc.com)

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I think from memory that you change this in the table design window even though it says you can't change/save the settings?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Try to run this function and see what happens:
    Code:
    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
     Dim i, intChangedTables
    Dim response As Integer
    
    
    response = MsgBox("Do you wish to optimize all non-system tables by setting the Sub DataSheetName property to [None]?", vbYesNo + vbQuestion, "Optimize all non-system tables")
    If response = vbNo Then Exit Function
    
    
     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
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 06-06-2018, 05:48 AM
  2. Replies: 9
    Last Post: 10-27-2017, 05:06 PM
  3. Replies: 1
    Last Post: 04-24-2014, 05:10 PM
  4. Replies: 0
    Last Post: 05-21-2012, 07:00 PM
  5. Replies: 3
    Last Post: 01-03-2012, 12:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums