Version properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to create a DB properties called "version" and have it written
in the header of the project and/or each form and/or report ?

Anybody could help

FRED
 
FRED said:
I would like to create a DB properties called "version" and have it written
in the header of the project and/or each form and/or report ?


Right Click on the db window title bar and select Database
Properties. Select Custom tab and create the property.

You can the retrieve the value of the property using:

CurrentDb().Containers("Databases").Documents("UserDefined").Properties("Version")

and plug the result into a form's Caption property.

For the Access title bar, see AppTitle in VBA Help for the
ins and outs of doing this.
 
I tried this in a form

Me.Caption =
CurrentDb().Containers("databases").Documents("userdefined").Properties("version")

and it gives me the following error

Object variable or variable bloc With not define (erreur 91)

I have ms dao object library 3.6 installed running access2000 adp

any idea ?
 
Did you create the property first?

If you did, then maybe it has something to do with it being
an adp, which I can't help you with.
 
In an ADP, CurrentDb returns Nothing. (CurrentDb returns a reference to the
current Jet database, and in an ADP there is no current Jet database, hence,
Nothing.) I can't help with an ADP either, but I can confirm that trying to
use CurrentDb isn't going to work. My advice to Fred would be to try asking
this question in the microsoft.public.adp.sqlserver newsgroup.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Marshall Barton said:
Did you create the property first?

If you did, then maybe it has something to do with it being
an adp, which I can't help you with.
--
Marsh
MVP [MS Access]


I tried this in a form

Me.Caption =
CurrentDb().Containers("databases").Documents("userdefined").Properties("version")

and it gives me the following error

Object variable or variable bloc With not define (erreur 91)

I have ms dao object library 3.6 installed running access2000 adp
 
Brendan Reynolds said:
In an ADP, CurrentDb returns Nothing. (CurrentDb returns a reference to the
current Jet database, and in an ADP there is no current Jet database, hence,
Nothing.) I can't help with an ADP either, but I can confirm that trying to
use CurrentDb isn't going to work. My advice to Fred would be to try asking
this question in the microsoft.public.adp.sqlserver newsgroup.


Just goes to show how very little I know about ADPs.

Thanks for helping out Brendan
 
Back
Top