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.
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.
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
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:- Create a Function that will extract the requested Property.
- Function GetSummaryInfo(strPropName As String) As String
-
Dim dbs As Database, cnt As Container
-
Dim doc As Document, prp As Property
-
-
'Property not found error.
-
Const conPropertyNotFound = 3270
-
-
On Error GoTo GetSummary_Err
-
Set dbs = CurrentDb
-
Set cnt = dbs.Containers!Databases
-
Set doc = cnt.Documents!SummaryInfo
-
doc.Properties.Refresh
-
-
GetSummaryInfo = doc.Properties(strPropName)
-
-
GetSummary_Bye:
-
Exit Function
-
-
GetSummary_Err:
-
If Err = conPropertyNotFound Then
-
Set prp = doc.CreateProperty(strPropName, dbText, "None")
-
'Append to collection.
-
doc.Properties.Append prp
-
Resume
-
Else
-
'Unknown error.
-
GetSummaryInfo = ""
-
Resume GetSummary_Bye
-
End If
-
End Function
- Pass the required Argument to the Function.
- Dim strTitle As String, strSubject As String
-
Dim strAuthor As String, strManager As String
-
-
strTitle = GetSummaryInfo("Title")
-
strSubject = GetSummaryInfo("Subject")
-
strAuthor = GetSummaryInfo("Author")
-
strManager = GetSummaryInfo("Manager")
-
'etc........
-
-
Debug.Print "Title: " & strTitle
-
Debug.Print "Subject: " & strSubject
-
Debug.Print "Author: " & strAuthor
-
Debug.Print "Manager: " & strManager
- Sample Output has been provided.
OUTPUT: - Title: Summary Info Code Demonstration
-
Subject: Retrieve Summary Database Properties
-
Author: ADezii
-
Manager: You Guessed it! - ADezii
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:- Create a Function that will extract the requested Property.
- Function GetSummaryInfo(strPropName As String) As String
-
Dim dbs As Database, cnt As Container
-
Dim doc As Document, prp As Property
-
-
'Property not found error.
-
Const conPropertyNotFound = 3270
-
-
On Error GoTo GetSummary_Err
-
Set dbs = CurrentDb
-
Set cnt = dbs.Containers!Databases
-
Set doc = cnt.Documents!SummaryInfo
-
doc.Properties.Refresh
-
-
GetSummaryInfo = doc.Properties(strPropName)
-
-
GetSummary_Bye:
-
Exit Function
-
-
GetSummary_Err:
-
If Err = conPropertyNotFound Then
-
Set prp = doc.CreateProperty(strPropName, dbText, "None")
-
'Append to collection.
-
doc.Properties.Append prp
-
Resume
-
Else
-
'Unknown error.
-
GetSummaryInfo = ""
-
Resume GetSummary_Bye
-
End If
-
End Function
- Pass the required Argument to the Function.
- Dim strTitle As String, strSubject As String
-
Dim strAuthor As String, strManager As String
-
-
strTitle = GetSummaryInfo("Title")
-
strSubject = GetSummaryInfo("Subject")
-
strAuthor = GetSummaryInfo("Author")
-
strManager = GetSummaryInfo("Manager")
-
'etc........
-
-
Debug.Print "Title: " & strTitle
-
Debug.Print "Subject: " & strSubject
-
Debug.Print "Author: " & strAuthor
-
Debug.Print "Manager: " & strManager
- Sample Output has been provided.
OUTPUT: - Title: Summary Info Code Demonstration
-
Subject: Retrieve Summary Database Properties
-
Author: ADezii
-
Manager: You Guessed it! - ADezii
To Set a Database Summary Property: - Function SetCustomProperty(strPropName As String, intPropType _
-
As Integer, strPropValue As String) As Integer
-
-
Dim dbs As Database, cnt As Container
-
Dim doc As Document, prp As Property
-
-
Const conPropertyNotFound = 3270 ' Property not found error.
-
-
Set dbs = CurrentDb ' Define Database object.
-
Set cnt = dbs.Containers!Databases ' Define Container object.
-
Set doc = cnt.Documents!SummaryInfo ' Define Document object.
-
-
On Error GoTo SetCustom_Err
-
-
doc.Properties.Refresh
-
' Set custom property name. If error occurs here it means
-
' property doesn't exist and needs to be created and appended
-
' to Properties collection of Document object.
-
Set prp = doc.Properties(strPropName)
-
prp.Value = strPropValue ' Set custom property value.
-
-
SetCustomProperty = True
-
-
SetCustom_Bye:
-
Exit Function
-
-
SetCustom_Err:
-
If Err = conPropertyNotFound Then
-
Set prp = doc.CreateProperty(strPropName, intPropType, strPropValue)
-
doc.Properties.Append prp ' Append to collection.
-
Resume Next
-
Else ' Unknown error.
-
MsgBox Err.Description
-
SetCustomProperty = False
-
Resume SetCustom_Bye
-
End If
-
End Function
- Dim intRet As Integer
-
intRet = SetCustomProperty("Title", dbText, "Herman Munster")
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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:...
|
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?
...
|
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...
|
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...
|
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 =...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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: 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,...
|
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...
|
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...
| |