473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Unable to set .SubDateSheetName=[None]

Same DB, same table, two different PCs.
--------------------------------------------------------------
PC #1, I'm able to do it, no problem.

PC #2, will let me do it and close the table with no error messages,
but when I open it again, it has reverted to [Auto].
--------------------------------------------------------------

Something about a service pack?

--
PeteCresswell
Jun 26 '06 #1
2 1380
(PeteCresswell) wrote in message
<sv********************************@4ax.com> :
Same DB, same table, two different PCs.
--------------------------------------------------------------
PC #1, I'm able to do it, no problem.

PC #2, will let me do it and close the table with no error messages,
but when I open it again, it has reverted to [Auto].
--------------------------------------------------------------

Something about a service pack?


When I encounteered it, I thought it was due to Access version. I think
in Access 2003, I had to set it programatically, while in 2000 and
2002, I could do it in design view.

currentdb.tabledefs("yourtbl").properties("subdata sheetname").value =
"[none]"

--
Roy-Vidar
Jun 26 '06 #2
Per RoyVidar:
When I encounteered it, I thought it was due to Access version. I think
in Access 2003, I had to set it programatically, while in 2000 and
2002, I could do it in design view.

currentdb.tabledefs("yourtbl").properties("subdat asheetname").value =
"[none]"


That did the trick... Thanks!

================================================== ========
Public Sub SubDataSheetZap()

Dim thisDB As DAO.Database
Dim curTD As DAO.TableDef
Dim newProp As DAO.Property
Dim i As Long
Dim k As Long

Const myNone = "[None]"
Const newPropName = "SubDataSheetname"

DoCmd.Hourglass True

Set thisDB = CurrentDb()

SysCmd acSysCmdInitMeter, "Zapping SubDataSheet Names...",
thisDB.TableDefs.Count
For i = 0 To thisDB.TableDefs.Count - 1
Set curTD = thisDB.TableDefs(i)
If Left$(curTD.Name,4) <> "Msys" then
If tablePropExist(newPropName, curTD) Then
curTD.Properties(newPropName) = myNone
Else
Set newProp = curTD.CreateProperty(newPropName, dbText, myNone)
curTD.Properties.Append newProp
Set newProp = Nothing
End If
End If
k = k + 1
SysCmd acSysCmdUpdateMeter, i
Next i

SysCmd acSysCmdRemoveMeter
Set curTD = Nothing
Set newProp = Nothing
DoCmd.Hourglass False
MsgBox k & " tables updated", , "Done"
End Sub

Private Function tablePropExist(ByVal thePropName As String, ByRef theTD As
DAO.TableDef) As Boolean
Dim myProp As DAO.Property

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

If Not myProp Is Nothing Then
tablePropExist = True
End If
End Function
================================================== ========
--
PeteCresswell
Jun 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I'm probably missing something obvious, but I'm unable to write a file with this function. I've used my FTP software to set permissions to 777 on all the files in question. I've tried r, r+, w, and...
2
by: karen scheu via AccessMonster.com | last post by:
I am having trouble lately opening my local tables. It is taking a a few seconds to open the table that has no records in it. I read that there is a bug with the AutoCorrect feature and so I set...
1
by: Muscha | last post by:
Hello, Every now and then my application throw this exception: "Unable to read data from the transport connection" And when I break into the Visual Studio, the thread where it failed has...
0
by: Muscha | last post by:
Hello, I posted this yesterday to the NG but there is no answer. Posting it again hoping it may catch someone attention. Thanks, /m -------------
0
by: Chris Fink | last post by:
I have walked through all of the WSE 3 Hands on Labs and got everything working fine. When I create my own certificate and install it in the stores, my client application that is consuming my WSE...
1
by: SS Hares | last post by:
Hi, I'm encountering an issue where the InvokeTypes method is returning None and I'm unable to Dispatch a particular COM object from DMCoreAutomation.dll. Everything works fine except for method...
0
by: Nachi | last post by:
I have installed SQL Server 2000 with VS 2005 - did not install SqlExpress\Sql 2005. I have a remote Sql Server Instance locally. The normal application connectes to this Sql Server. When I run...
8
by: michay | last post by:
hi when i try to debug a web application, i get the following error message: error while trying to run project: unable to start debugging on the web server but when i try to debug a...
0
by: Paul Lemelle | last post by:
Jeff, Thanks for your reply. I would like to like the absolute path of a directory. I thought that os.listdir just returns the nam itself in a data list. I noticed that none was being return...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.