Bill-
Thanks a lot.
Best Regards,
Kevin
发自我的小米手机
在 "wrmosca@comcast.net [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>,2015年11月9日 上午12:26写道:
Kevin
Here is a procedure I wrote years ago to turn off Subdatasheets in all tables.Public Function dev_TbrTurnOffSubDataSheets()'Purpose : Access sets all tables' SubDataSheets to Auto which slows up loading time.' This function will set the property to [none].'DateTime : 1/14/2004 09:20'Author : Bill MoscaDim db As DAO.DatabaseDim prop As DAO.PropertyDim propName As String, propVal As StringDim propType As Integer, i As IntegerOn Error Resume NextSet db = CurrentDbpropName = "SubDataSheetName"propType = 10propVal = "[NONE]"For i = 0 To db.TableDefs.Count - 1If (db.TableDefs(i).Attributes And dbSystemObject) = 0 ThenIf db.TableDefs(i).Properties(propName).Value <> propVal Thendb.TableDefs(i).Properties(propName).Value = propValEnd IfIf Err.Number = 3270 ThenErr.ClearSet prop = db.TableDefs(i).CreateProperty(propName)prop.Type = propTypeprop.Value = propValdb.TableDefs(i).Properties.Append propElseIf Err.Number <> 0 ThenResume NextEnd IfEnd IfEnd IfNext iMsgBox "The " & propName & _" value for all non-system tables has been updated to " & propVal & "."Set prop = NothingSet db = NothingEnd FunctionI put the module that contains this and many other development routines in our Files folder. It's named DevToolbar.zip. If you import it into your database you can run any of the routines. There is also a 2003 toolbar that you can import. For veriosn 2007 and higher the toolbar will show up under Add-ins tab.Regards,Bill Mosca, Founder - MS_Access_Professionalshttp://www.thatlldoit.comMicrosoft Office Access MVPhttp://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852My nothing-to-do-with-Access bloghttp://wrmosca.wordpress.com
---In MS_Access_Professionals@yahoogroups.com, <zhaoliqingoffice@163.com> wrote :John-Changing the Subdatasheet property of all tables to [None], will this cause any problem to the tables? Thanks.Best Regards,Kevinzhaoliqingoffice@163.com
__._,_.___
Posted by: Kevin <zhaoliqingoffice@163.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (7) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar