subdatabasename at frontend

I

iccsi

I tried to set subdatasheet property at table design view.

After I set the property on the backend which works, but it changes
back to auto when I reopen it.

Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.

Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,
 
A

Arvin Meyer [MVP]

Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].

Unless you have a single user database, the tables should never be in sight
or used by the database users. Doing so jeopardizes data integrity.
 
I

iccsi

Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].

Unless you have a single user database, the tables should never be in sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP, MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com




I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -

- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?

Thanks again,
 
L

Larry Linson

Perhaps it would be helpful if I summarize Arvin's advice: do not use
subdatasheets.

I can also concur wholeheartedly with that advice.

Also, if you do, I cannot imagine a situation in which there would be a
business requirement that could not be satisfied some other way than
renaming the subdatasheet objects at runtime.

Larry Linson
Microsoft Office Access MVP

Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].

Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com




I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -

- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?

Thanks again,
 
A

Arvin Meyer [MVP]

Here's the code:

Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer

Const conNone = "[None]"
Const conProp = "SubDataSheetname"

Set db = CurrentDb()

SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...", db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i

SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"

End Sub

Private Function tablePropExist(ByVal thePropName As String, ByRef theTD As
DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False

Dim prp As DAO.Property

On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0

If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].

Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com




I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -

- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?

Thanks again,
 
J

Jeanette Cunningham

Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically when
you create a new table.

NameAutoCorrect is set from Access options. In A2003 it is on the General
tab.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Arvin Meyer said:
Here's the code:

Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer

Const conNone = "[None]"
Const conProp = "SubDataSheetname"

Set db = CurrentDb()

SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...", db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i

SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"

End Sub

Private Function tablePropExist(ByVal thePropName As String, ByRef theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False

Dim prp As DAO.Property

On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0

If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].

Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmvp.com




I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -

- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?

Thanks again,
 
I

iccsi

Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically when
you create a new table.

NameAutoCorrect is set from Access options. In A2003 it is on the General
tab.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...", db.TableDefs.Count
   For i = 0 To db.TableDefs.Count - 1
       Set tdf = db.TableDefs(i)
           If Mid(tdf.Name, 2, 3) <> "sys" Then
               If tablePropExist(conProp, tdf) Then
                   tdf.Properties(conProp) = conNone
               Else
                   Set prp = tdf.CreateProperty(conProp, dbText, conNone)
                   tdf.Properties.Append prp
                   Set prp = Nothing
               End If
           End If
       SysCmd acSysCmdUpdateMeter, i
   Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
Private Function tablePropExist(ByVal thePropName As String, ByRef theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
'                   - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
   If Not prp Is Nothing Then
       tablePropExist = True
   End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -

- Show quoted text -

Thanks millions for advise,
My question is what will be the best choice the grandchildren user
interface on the form?
For example, I have a form for the grandparent table and a sub form
for child.
Is it the best way to use button to let user click to get grand
children information?
In this case user can not see grandchildren information on the same
form.

Any suggestions is great appreciated,
 
I

iccsi

Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically when
you create a new table.

NameAutoCorrect is set from Access options. In A2003 it is on the General
tab.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...", db.TableDefs.Count
   For i = 0 To db.TableDefs.Count - 1
       Set tdf = db.TableDefs(i)
           If Mid(tdf.Name, 2, 3) <> "sys" Then
               If tablePropExist(conProp, tdf) Then
                   tdf.Properties(conProp) = conNone
               Else
                   Set prp = tdf.CreateProperty(conProp, dbText, conNone)
                   tdf.Properties.Append prp
                   Set prp = Nothing
               End If
           End If
       SysCmd acSysCmdUpdateMeter, i
   Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
Private Function tablePropExist(ByVal thePropName As String, ByRef theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
'                   - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
   If Not prp Is Nothing Then
       tablePropExist = True
   End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend does
not know the datasubsheet property and I can not set in the front end.
Any information can set subdatasheetname property at run time or makes
it work in the front end is great appreciated,- Hide quoted text -
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -

- Show quoted text -

Thanks again,
Where to set NameAutocorrect property of the table? I can not find at
design level.
By the way, I set subdatasheet to none at design time, but it comes
back to auto when I reopen it.
Is it normal, should I put code to force them to none?

Thanks millions again,
 
J

Jeanette Cunningham

Name Autocorrect is set for the whole database.
Go to Tools | Options | General tab

In A2007 go to the big home button, select options, not sure which one it is
on, but is on one of them.

After you turn off name auto correct, you can go back to the tables and
remove the sub datasheets.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically when
you create a new table.

NameAutoCorrect is set from Access options. In A2003 it is on the General
tab.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

message

Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...",
db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
Private Function tablePropExist(ByVal thePropName As String, ByRef theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code
to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend
does
not know the datasubsheet property and I can not set in the front
end.
Any information can set subdatasheetname property at run time or
makes
it work in the front end is great appreciated,- Hide quoted text -
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -

- Show quoted text -

Thanks again,
Where to set NameAutocorrect property of the table? I can not find at
design level.
By the way, I set subdatasheet to none at design time, but it comes
back to auto when I reopen it.
Is it normal, should I put code to force them to none?

Thanks millions again,
 
I

iccsi

Name Autocorrect is set for the whole database.
Go to Tools | Options | General tab

In A2007 go to the big home button, select options, not sure which one itis
on, but is on one of them.

After you turn off name auto correct, you can go back to the tables and
remove the sub datasheets.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically when
you create a new table.
NameAutoCorrect is set from Access options. In A2003 it is on the General
tab.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
messagenews:[email protected]...
Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...",
db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
End Sub
Private Function tablePropExist(ByVal thePropName As String, ByRef theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code
to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend
does
not know the datasubsheet property and I can not set in the front
end.
Any information can set subdatasheetname property at run time or
makes
it work in the front end is great appreciated,- Hide quoted text -
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -
- Show quoted text -

Thanks again,
Where to set NameAutocorrect property of the table? I can not find at
design level.
By the way, I set subdatasheet to none at design time, but it comes
back to auto when I reopen it.
Is it normal, should I put code to force them to none?

Thanks millions again,- Hide quoted text -

- Show quoted text -

I use Access 2003 which has 3 auto name correct for track, log name
and perform, should I to uncheck them all?

Thanks again,
 
J

Jeanette Cunningham

Yes

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Name Autocorrect is set for the whole database.
Go to Tools | Options | General tab

In A2007 go to the big home button, select options, not sure which one it
is
on, but is on one of them.

After you turn off name auto correct, you can go back to the tables and
remove the sub datasheets.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically
when
you create a new table.
NameAutoCorrect is set from Access options. In A2003 it is on the
General
tab.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
messagenews:[email protected]...
Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...",
db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
End Sub
Private Function tablePropExist(ByVal thePropName As String, ByRef
theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code
to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never be in
sight
or used by the database users. Doing so jeopardizes data integrity.
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend
does
not know the datasubsheet property and I can not set in the front
end.
Any information can set subdatasheetname property at run time or
makes
it work in the front end is great appreciated,- Hide quoted text -
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -
- Show quoted text -

Thanks again,
Where to set NameAutocorrect property of the table? I can not find at
design level.
By the way, I set subdatasheet to none at design time, but it comes
back to auto when I reopen it.
Is it normal, should I put code to force them to none?

Thanks millions again,- Hide quoted text -

- Show quoted text -

I use Access 2003 which has 3 auto name correct for track, log name
and perform, should I to uncheck them all?

Thanks again,
 
I

iccsi

Yes

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


Name Autocorrect is set for the whole database.
Go to Tools | Options | General tab
In A2007 go to the big home button, select options, not sure which one it
is
on, but is on one of them.
After you turn off name auto correct, you can go back to the tables and
remove the sub datasheets.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
Another thing to do is turn off NameAutocorrect.
If you leave it on, you can get sub data sheets created automatically
when
you create a new table.
NameAutoCorrect is set from Access options. In A2003 it is on the
General
tab.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
message
Here's the code:
Public Sub KillSubDataSheets()
' © Arvin Meyer 6/25/2005
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim prp As DAO.Property
Dim i As Integer
Const conNone = "[None]"
Const conProp = "SubDataSheetname"
Set db = CurrentDb()
SysCmd acSysCmdInitMeter, "Deleting SubDataSheets ...",
db.TableDefs.Count
For i = 0 To db.TableDefs.Count - 1
Set tdf = db.TableDefs(i)
If Mid(tdf.Name, 2, 3) <> "sys" Then
If tablePropExist(conProp, tdf) Then
tdf.Properties(conProp) = conNone
Else
Set prp = tdf.CreateProperty(conProp, dbText, conNone)
tdf.Properties.Append prp
Set prp = Nothing
End If
End If
SysCmd acSysCmdUpdateMeter, i
Next i
SysCmd acSysCmdRemoveMeter
Set tdf = Nothing
Set prp = Nothing
MsgBox "Done!"
End Sub
Private Function tablePropExist(ByVal thePropName As String, ByRef
theTD
As DAO.TableDef) As Boolean
'© Arvin Meyer 6/25/2005
' PURPOSE: To determine if a property exists in a tabldef
' ACCEPTS: - Name of property we are checking on
' - Pointer to tabledef in question
' RETURNS: True if property exists, else False
Dim prp As DAO.Property
On Error Resume Next
Set prp = theTD.Properties(thePropName)
On Error GoTo 0
If Not prp Is Nothing Then
tablePropExist = True
End If
End Function
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Setting subdatasheets will slow the database tremendously. I use code
to
make sure that all of them are always set to [none].
Unless you have a single user database, the tables should never bein
sight
or used by the database users. Doing so jeopardizes data integrity..
--
Arvin Meyer, MCP,
MVPhttp://www.datastrat.comhttp://www.mvps.org/accesshttp://www.accessmv...

I tried to set subdatasheet property at table design view.
After I set the property on the backend which works, but it changes
back to auto when I reopen it.
Even backend subdatasheet name work at backend. It seems frontend
does
not know the datasubsheet property and I can not set in the front
end.
Any information can set subdatasheetname property at run time or
makes
it work in the front end is great appreciated,- Hide quoted text-
- Show quoted text -
I set them to none, but it changes to Auto.
Can you please let me know any how to set to none using VBA code?
Thanks again,- Hide quoted text -
- Show quoted text -
Thanks again,
Where to set NameAutocorrect property of the table? I can not find at
design level.
By the way, I set subdatasheet to none at design time, but it comes
back to auto when I reopen it.
Is it normal, should I put code to force them to none?
Thanks millions again,- Hide quoted text -
- Show quoted text -

I use Access 2003 which has 3 auto name correct for track, log name
and perform, should I to uncheck them all?

Thanks again,- Hide quoted text -

- Show quoted text -

Thanks millions,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top