The general principle is the same however you do this.
Have somewhere you can edit this value easily, read the value in at run time
and then apply it.
For example, in the frontend of your database create a new table
(tblControl) to the following schema
Field Name Type Size
ctl_group Text 50
ctl_item Text 50
ctl_value Text 255
Set ctl_group and ctl_item as the primary key.
Open the table and put
the name of your switchboard form in the ctl_group field
the literal string "caption" (without the quotes) in the ctl_item field
the caption you want to use for the form in the ctl_value field
Then in your switchboard in the code behind the form put the following
Private Sub Form_Open(Cancel As Integer)
Call SetMeUp
End Sub
Private Sub SetMeUp()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Const SQL = "SELECT ctl_item, ctl_value " _
& "FROM tblControl " _
& "WHERE ctl_group = '"
strSQL = SQL & Me.Name & "'"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
With rs
Do Until .EOF
Me.Properties(.Fields("ctl_item").Value) =
..Fields("ctl_value").Value
.MoveNext
Loop
End With
End Sub
When you open the form whatever you put in as the ctl_value will display as
the forms caption.
The beauty of this is that it can be extended so for example you could have
entries as follows
ctl_group ctl_item ctl_value
switchboard caption This is the caption
switchboard DividingLines 0
switchboard NavigationButtons 0
switchboard RecordSelectors 0
Then when the form named switchboard was opened it would set it's caption to
"This is the caption", switch off the dividing lines, navigation buttons and
the record selectors but it is simplicity itself for the developer to change
these.
---------------------------------
Of course this is not the only way you can do this, you could just as easily
persist these property values in a text file or an ini file use database
properties or put them in a table on a server.
Where ever you persist them, the principle is the same, persist them
somewhere it is easy to change them for the developer and then read them
back at run time.
--
Terry Kreft
<mp********@yahoo.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
I have recently inherited a database. The switchboard (and other forms)
displays the name of the database on it (top, center). Currently the
name that appears is Reviews. There are plans to roll out the
application (i.e. making copies of the database) to other locations
(Reviews-NY, Review-Dallas etc). If was mentioned today in passing by
the original developer that there is a way to change the title that
appears on the switchboard without changing the form design each time
the database is copied for a new location. That this can be one via a
text document. Have any head about this method? How does one go about
doing this?