The practical way to change the caption of page header

  • Thread starter Frank Situmorang
  • Start date
F

Frank Situmorang

Hello,

I have designed our church membership database and on each report I have the
page header/name of the report such as " Kebayoran SDA Church". Since I will
distribute this database to many churches of our denomination. What is the
practical way to chage the report captioned name/header. For example I will
give it to Salemba SDA church, I have to change the name of the report to be
" Salemba SDA church". Istead of change it manually. Is there any way to
change it? Or should we make a value list on the name and list all churches
on the report header?

Thanks for anyidea provided.
 
B

Bill

My approach to this exact problem was to create
a table of "Installation Properties" and have the
church secretary set the various properties that
are peculiar to the current installation (church) when
the application was first installed. (This is a necessary
approach to assuring that nothing is hard-coded
anywhere within the application.)

Then, when the application starts, a global set of
variables are initialized in a general module with
values taken from the "properties table".

It also turns out that the general module determines
the level of the backend database and attends to
any table upgrades that might arise as the application
advances in versions.

Your specific situation would be handled in the form's
or report's OnOpen code in setting whatever captions
there are that are peculiar to the current installation.

Bill Stanton
Graeagle, CA
 
B

Bill

That's essentially what I do, except I don't execute a DLookup
every time I need one of the table's values. In my case, there are
numerous references to values taken from the installation's
properties table, so I only set the global variables once at startup.

Bill Stanton
 
M

Marshall Barton

Frank said:
I have designed our church membership database and on each report I have the
page header/name of the report such as " Kebayoran SDA Church". Since I will
distribute this database to many churches of our denomination. What is the
practical way to chage the report captioned name/header. For example I will
give it to Salemba SDA church, I have to change the name of the report to be
" Salemba SDA church". Istead of change it manually. Is there any way to
change it? Or should we make a value list on the name and list all churches
on the report header?


I suggest that you create a one row table for this kind of
installation specific values. The report page header text
box can then use a DLookup expression to retrieve the value.

This way your installation procedure (even if its manual)
can set the value. Or, probably better, you could create a
simple form bound to the table and let each site's
administrator update it for themselves.
 
B

Bill

About the only time I trust the use of global variables,
as I've used them here, is to have a general module that
contains ONLY the dim'd variables. Then, when the
startup general module runs, it loads a recordset (a table
with only one record) with a Select and sets the variables.

The variables names adhere to a strict syntax and remain
static throughout the life of the active application. In this
particular application (somewhat sizable), there are 26
variables, of which 15 are installation dependent. So, I'm
not just dealing with report/form captions.

Bill

Marshall Barton said:
Right, but it's a trade off between the number of times the
values are used and the issue of globals being in the same
basket as Go To statements (not to mention the nagging
problem of global variables being reset).

Personally, I kind of like the idea of opening the admin
form (hidden) and using the values in the bound controls.
Another useful approach is to create a class just for these
values, but I think these are overkill for just a couple of
captions.
--
Marsh
MVP [MS Access]

That's essentially what I do, except I don't execute a DLookup
every time I need one of the table's values. In my case, there are
numerous references to values taken from the installation's
properties table, so I only set the global variables once at startup.


"Marshall Barton" wrote
 
M

Marshall Barton

Right, but it's a trade off between the number of times the
values are used and the issue of globals being in the same
basket as Go To statements (not to mention the nagging
problem of global variables being reset).

Personally, I kind of like the idea of opening the admin
form (hidden) and using the values in the bound controls.
Another useful approach is to create a class just for these
values, but I think these are overkill for just a couple of
captions.
 
F

Frank Situmorang

Bill,

Thanks for your idea, but since I am just relatively new with this Access (
just started in Dec 2007) so I am not so clear with your suggestion, are you
saying that we need a table, than we assingn aan bound textbox control in the
form taking the name from this table?.

I will give an MDE format to them so they will not be able to change it.
What I intend to do is to assign the name my self and there will be more
than 80 churches in Jakarta with different names.

Could please explain step by step what shall we do first, I have tested my
database and the complie is ok

Thanks in advance for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top