473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing Switchboard Textbox Title Via Text Document

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?

Mar 24 '06 #1
1 2651
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?

Mar 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jan Van Steenbergen | last post by:
Hi all i'm having a little problem I have a aspx file with a iFrame defined The iframe is loaded with a html webeditor After editing data in the webeditor textbox, i want t get the data to a...
6
by: tshad | last post by:
Is there a way during Page_Load to change or add an attribute to the Body tag? I want to be able to change the onLoad body attribute to do a focus on one of my text boxes, such as: ...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
4
by: gubbachchi | last post by:
Hi all, Please anybody help me solve this problem. I am stuck up with this from past 2 weeks. I am developing an application where, when the user selects date from javascript datepicker and enters...
5
by: jc | last post by:
It would appear I cannot do this unless it's a richtextbox... but is there any way I can change the color of a given string inside a textbox control? Maybe with javascript? Postrender? CSS? ...
1
by: rakeshnair | last post by:
i wrote a code in jsp to create dynamic table..the problem is i need data base connection when cursor moves from one cell to other... eg...when i enter product id in the first cell, the product name...
2
by: s2008 | last post by:
Hello, In my page i have two textboxes and a html button. I'm using vb.net 2.0 . what i need is i want whatever text selected in the textbox1 to be hyperlinked when clicked the button... this is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
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...
0
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...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.