Setting Database Properties (i.e., Revision Number) (1 Viewer)

MsfStl

Registered User.
Local time
Today, 12:58
Joined
Aug 31, 2004
Messages
74
Good afternoon,
I have finished completing the initial version of a database and am now ready to begin the testing phase. When looking at the database properties (Specifically - "Statistics") there is a "Revision Number", which is always blank. I expect some changes and would like to set the Version Number each time I make a revision. How do I set the "Revision Number" found under the Statistics tab from Database Properties which was pulled from the "File" button on the toolbar?

Thank you,

Scot
 

Ron_dK

Cool bop aficionado
Local time
Today, 19:58
Joined
Sep 5, 2002
Messages
2,141
I have looked at this one, but can't find any trigger to change the revision number. With all my dbases, there is no revision number given. Don't ask me why.

There is a program to change/alter settings of the file properties at this site :
http://www.gold-software.com/FilePropertiesChanger-review13318.htm

Unfortunately you can not change the revision number though.
 

Mile-O

Back once again...
Local time
Today, 18:58
Joined
Dec 10, 2002
Messages
11,316
I just create a public constant in a module and refer to that when I want the version number.
i.e

Code:
Const AppVersion As String = "v1.00.02"
 

Ron_dK

Cool bop aficionado
Local time
Today, 19:58
Joined
Sep 5, 2002
Messages
2,141
That's a neat solution SJ, but I guess that v1.00... number will not be in the revision number in the Dbase properties, is it ?
 

ScottGem

Registered User.
Local time
Today, 13:58
Joined
Jun 20, 2005
Messages
1,119
The way I do versioning starts off going to File>Database Properties and then the Custom tab. I then create 2 properties by typing their names (appVersion and appBuild), setting the Type to Number and entering inital values of 1 and 0 respectively.

I then have a subform that I place on my switchboards that has 2 text controls with datasources of:

=CustomDBProp("appVersion")
=CustomDBProp("appBuild")


Following is the CustomDBProp function:

Public Function CustomDBProp(PropName As String) As String
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim strret As String

On Error GoTo CustomDBProp_err
Set dbs = CurrentDb
Set cnt = dbs.Containers("databases")
Set doc = cnt.Documents("UserDefined")
strret = doc.Properties(PropName)
CustomDBProp_end:
CustomDBProp = strret
Exit Function
CustomDBProp_err:
If Err = 3270 Then
strret = "Property Not Found"
Else
MsgBox Err & ": " & Err.Description
End If
Resume CustomDBProp_end
End Function
 

wazz

Super Moderator
Local time
Tomorrow, 01:58
Joined
Jun 29, 2004
Messages
1,711
hi scott.

i read your post when you first posted it and i thought i *must* try it some day. well that day is today but i'm stuck for some reason. i cannot get it to work.

the first error was a missing DAO reference.

now i'm getting a type mismatch.

one thing i'm doing differently from your description is, i'm not using a subform but a plain, empty form with nothing on it but two ubound text boxes. i can't imagine that that is the problem though.

i tried changing "UserDefined" to the name of my database and also to the name of the form that the two controls are on, but that seems useless.

any thoughts as to why it is not working for me? i don't know what else to say at this point that would help.

w
 
Last edited:

ScottGem

Registered User.
Local time
Today, 13:58
Joined
Jun 20, 2005
Messages
1,119
As far as changing the code, there shouldn't be any changes needed. I just created a new database with a single form following these instructions and it worked fine. I've attached it.
 

Attachments

  • Versioning.zip
    9.4 KB · Views: 325

wazz

Super Moderator
Local time
Tomorrow, 01:58
Joined
Jun 29, 2004
Messages
1,711
tnx for that. i'll have a look asap.
w
 

wazz

Super Moderator
Local time
Tomorrow, 01:58
Joined
Jun 29, 2004
Messages
1,711
hi again. the problem was fixed by changing the priorities of the VBA references. the ADO recordset library reference was above DAO. putting DAO ahead/above all ADO references fixed the problem.
w
 

Users who are viewing this thread

Top Bottom