473,439 Members | 1,926 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,439 software developers and data experts.

Database Summary Title

I am using Access 2003.

Part 1.
I am trying to find a way to have the title from the Database Properties/Summary window to be copied to the File/Properties/Summary/Title field?

Part 2.
The next part of this problem is that when compact on close is selected which we need to do then the title in the File/Properties/Summary/Title field is blank. Is there a way to have this field always updated after a compact. This way we always can tell which version is in use.

Open to any suggestions on this.

Thanks In Advance.
Aug 28 '07 #1
4 3434
NeoPa
32,556 Expert Mod 16PB
Are you really asking question one because of the behaviour specified in question two?

If answering your questions as put I'd start off by saying you can use cut/paste to set tham the same way.
Sep 2 '07 #2
Lysander
344 Expert 100+
I am using Access 2003.

Part 1.
I am trying to find a way to have the title from the Database Properties/Summary window to be copied to the File/Properties/Summary/Title field?

Part 2.
The next part of this problem is that when compact on close is selected which we need to do then the title in the File/Properties/Summary/Title field is blank. Is there a way to have this field always updated after a compact. This way we always can tell which version is in use.

Open to any suggestions on this.

Thanks In Advance.
If you are trying to keep track of version, I use two tables in all my database, tblGlobalData in the back end, tblGlobalCode in the front end. These tables hold the current version number and I have code written that detects that the version numbers are correct and users are not running old versions. Not answering your problem but maybe a different way of solving it
Sep 2 '07 #3
ADezii
8,834 Expert 8TB
I am using Access 2003.

Part 1.
I am trying to find a way to have the title from the Database Properties/Summary window to be copied to the File/Properties/Summary/Title field?

Part 2.
The next part of this problem is that when compact on close is selected which we need to do then the title in the File/Properties/Summary/Title field is blank. Is there a way to have this field always updated after a compact. This way we always can tell which version is in use.

Open to any suggestions on this.

Thanks In Advance.
To retrieve Summary Database Properties:
  1. Create a Function that will extract the requested Property.
    Expand|Select|Wrap|Line Numbers
    1. Function GetSummaryInfo(strPropName As String) As String
    2. Dim dbs As Database, cnt As Container
    3. Dim doc As Document, prp As Property
    4.  
    5. 'Property not found error.
    6. Const conPropertyNotFound = 3270
    7.  
    8. On Error GoTo GetSummary_Err
    9. Set dbs = CurrentDb
    10. Set cnt = dbs.Containers!Databases
    11. Set doc = cnt.Documents!SummaryInfo
    12. doc.Properties.Refresh
    13.  
    14. GetSummaryInfo = doc.Properties(strPropName)
    15.  
    16. GetSummary_Bye:
    17.   Exit Function
    18.  
    19. GetSummary_Err:
    20. If Err = conPropertyNotFound Then
    21.   Set prp = doc.CreateProperty(strPropName, dbText, "None")
    22.   'Append to collection.
    23.   doc.Properties.Append prp
    24.     Resume
    25. Else
    26.   'Unknown error.
    27.   GetSummaryInfo = ""
    28.     Resume GetSummary_Bye
    29. End If
    30. End Function
  2. Pass the required Argument to the Function.
    Expand|Select|Wrap|Line Numbers
    1. Dim strTitle As String, strSubject As String
    2. Dim strAuthor As String, strManager As String
    3.  
    4. strTitle = GetSummaryInfo("Title")
    5. strSubject = GetSummaryInfo("Subject")
    6. strAuthor = GetSummaryInfo("Author")
    7. strManager = GetSummaryInfo("Manager")
    8. 'etc........
    9.  
    10. Debug.Print "Title: " & strTitle
    11. Debug.Print "Subject: " & strSubject
    12. Debug.Print "Author: " & strAuthor
    13. Debug.Print "Manager: " & strManager
  3. Sample Output has been provided.
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. Title: Summary Info Code Demonstration
  2. Subject: Retrieve Summary Database Properties
  3. Author: ADezii
  4. Manager: You Guessed it! - ADezii
Sep 3 '07 #4
ADezii
8,834 Expert 8TB
I am using Access 2003.

Part 1.
I am trying to find a way to have the title from the Database Properties/Summary window to be copied to the File/Properties/Summary/Title field?

Part 2.
The next part of this problem is that when compact on close is selected which we need to do then the title in the File/Properties/Summary/Title field is blank. Is there a way to have this field always updated after a compact. This way we always can tell which version is in use.

Open to any suggestions on this.

Thanks In Advance.
To retrieve Summary Database Properties:
  1. Create a Function that will extract the requested Property.
    Expand|Select|Wrap|Line Numbers
    1. Function GetSummaryInfo(strPropName As String) As String
    2. Dim dbs As Database, cnt As Container
    3. Dim doc As Document, prp As Property
    4.  
    5. 'Property not found error.
    6. Const conPropertyNotFound = 3270
    7.  
    8. On Error GoTo GetSummary_Err
    9. Set dbs = CurrentDb
    10. Set cnt = dbs.Containers!Databases
    11. Set doc = cnt.Documents!SummaryInfo
    12. doc.Properties.Refresh
    13.  
    14. GetSummaryInfo = doc.Properties(strPropName)
    15.  
    16. GetSummary_Bye:
    17.   Exit Function
    18.  
    19. GetSummary_Err:
    20. If Err = conPropertyNotFound Then
    21.   Set prp = doc.CreateProperty(strPropName, dbText, "None")
    22.   'Append to collection.
    23.   doc.Properties.Append prp
    24.     Resume
    25. Else
    26.   'Unknown error.
    27.   GetSummaryInfo = ""
    28.     Resume GetSummary_Bye
    29. End If
    30. End Function
  2. Pass the required Argument to the Function.
    Expand|Select|Wrap|Line Numbers
    1. Dim strTitle As String, strSubject As String
    2. Dim strAuthor As String, strManager As String
    3.  
    4. strTitle = GetSummaryInfo("Title")
    5. strSubject = GetSummaryInfo("Subject")
    6. strAuthor = GetSummaryInfo("Author")
    7. strManager = GetSummaryInfo("Manager")
    8. 'etc........
    9.  
    10. Debug.Print "Title: " & strTitle
    11. Debug.Print "Subject: " & strSubject
    12. Debug.Print "Author: " & strAuthor
    13. Debug.Print "Manager: " & strManager
  3. Sample Output has been provided.
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. Title: Summary Info Code Demonstration
  2. Subject: Retrieve Summary Database Properties
  3. Author: ADezii
  4. Manager: You Guessed it! - ADezii
To Set a Database Summary Property:
Expand|Select|Wrap|Line Numbers
  1. Function SetCustomProperty(strPropName As String, intPropType _
  2.     As Integer, strPropValue As String) As Integer
  3.  
  4. Dim dbs As Database, cnt As Container
  5. Dim doc As Document, prp As Property
  6.  
  7. Const conPropertyNotFound = 3270        ' Property not found error.
  8.  
  9. Set dbs = CurrentDb                     ' Define Database object.
  10. Set cnt = dbs.Containers!Databases      ' Define Container object.
  11. Set doc = cnt.Documents!SummaryInfo     ' Define Document object.
  12.  
  13. On Error GoTo SetCustom_Err
  14.  
  15. doc.Properties.Refresh
  16. ' Set custom property name. If error occurs here it means
  17. ' property doesn't exist and needs to be created and appended
  18. ' to Properties collection of Document object.
  19. Set prp = doc.Properties(strPropName)
  20. prp.Value = strPropValue                ' Set custom property value.
  21.  
  22. SetCustomProperty = True
  23.  
  24. SetCustom_Bye:
  25.   Exit Function
  26.  
  27. SetCustom_Err:
  28.   If Err = conPropertyNotFound Then
  29.     Set prp = doc.CreateProperty(strPropName, intPropType, strPropValue)
  30.     doc.Properties.Append prp           ' Append to collection.
  31.       Resume Next
  32.   Else                                  ' Unknown error.
  33.   MsgBox Err.Description
  34.     SetCustomProperty = False
  35.       Resume SetCustom_Bye
  36.   End If
  37. End Function
Expand|Select|Wrap|Line Numbers
  1. Dim intRet As Integer
  2. intRet = SetCustomProperty("Title", dbText, "Herman Munster")
Sep 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Keith | last post by:
Is it possible to modify the file properties of a file programmatically? For example, every file, when you right click has a properties option, then from that you can select the summary tab and...
3
by: Miguel Dias Moura | last post by:
Hello, I need to create a simple search in a web site. I have an input text where the user writes the words for search. When it clicks the "search" button a new page will appear with all the...
4
by: Eric | last post by:
Hello, I am having some sort of security issue with my code. When I change a file's title in a Windows or console app, I have no problems. (I am using Microsoft's article & DsoFile.dll:...
1
by: Michael Reynolds | last post by:
I can read file attributes just fine (author, title, etc,) But there's no way to update them. I know windows application can do it, but can a web application update these file attributes? ...
1
by: Neil | last post by:
Our hosting company's server went down a few days ago. After they fixed it, our PHP Page and Database are not interfacing. They are not believing me that I have done nothing on my end in several...
6
by: karen987 | last post by:
I have a webpage called "topicview.asp" on a news website with ASP pages, it's a simple news publishing software. You add the news from the Admin section and all the details are stored in a...
3
by: mmr315 | last post by:
I wrote code like this to retrive images <?php mysql_connect("__MUNGED__","__MUNGED__","__MUNGED__")or die('unable'); mysql_select_db("website"); $pid="151"; $gotten =...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
4
by: karen987 | last post by:
I want to draw out records from the database, and use them in my meta tags. I only want to use one record, which is called "TITLE", and i want to use this in the "title", "keywords", and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.