470,625 Members | 2,007 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,625 developers. It's quick & easy.

Need help with option group labels and embedding fonts..

I have an option group with about 30 options. I would like to have
the Option Labels get their text from a table. Is this possible, and
if so how?

Also, is it possible to embad a font into a database or does each
machine need to have that font installed?

Thanks for any help,

ShyGuy
Nov 12 '05 #1
7 3101
Sounds Dodgy. If the original option group is for say how do you want your
goods to travel -
1 Road
2 rail
3 Air
4 Sea
and someone changes the table to Air, Road, Sea, Air, you will get the wrong
answer.

Phil

"Shyguy" <Sh****@shytown.com> wrote in message
news:99********************************@4ax.com...
I have an option group with about 30 options. I would like to have
the Option Labels get their text from a table. Is this possible, and
if so how?

Also, is it possible to embad a font into a database or does each
machine need to have that font installed?

Thanks for any help,

ShyGuy

Nov 12 '05 #2
"Phil Stanton" wrote
Sounds Dodgy. . . .
and someone changes the table to Air,
Road, Sea, Air, you will get the wrong
answer.


That would be the Lookup Table for "Ship By" and it should not be available
for just anyone to go in and change, willy-nilly.

In a developed application distributed to users, the users should have
neither direct access to the Table, nor to the Query Builder, nor to a Form
to update that Table. It should also be declared with Referential Integrity
and Cascading Update so that _valid_ updates to the key field by a developer
would be carried forward to related tables (and a developer should know that
you don't change the description of "Road" to "Air" in a lookup table -- if
not, then continuation of employment ought not be an option).

Larry Linson
Microsoft Access MVP
Nov 12 '05 #3
I feel very nervous at arguing with an expert such as yourself Larry, but if
the table isn't going to be changed, why not write the label.Captions
directly

Phil
"Larry Linson" <bo*****@localhost.not> wrote in message
news:R3******************@nwrddc02.gnilink.net...
"Phil Stanton" wrote
> Sounds Dodgy. . . .
> and someone changes the table to Air,
> Road, Sea, Air, you will get the wrong
> answer.
That would be the Lookup Table for "Ship By" and it should not be

available for just anyone to go in and change, willy-nilly.

In a developed application distributed to users, the users should have
neither direct access to the Table, nor to the Query Builder, nor to a Form to update that Table. It should also be declared with Referential Integrity and Cascading Update so that _valid_ updates to the key field by a developer would be carried forward to related tables (and a developer should know that you don't change the description of "Road" to "Air" in a lookup table -- if not, then continuation of employment ought not be an option).

Larry Linson
Microsoft Access MVP

Nov 12 '05 #4
Don't feel nervous about disagreeing with me, Phil -- not only am I not
always right, but I am no longer embarrassed to admit it. Once I had made a
fool of myself in public a certain number of times, it no longer held any
terror for me. <G>

What I was thinking was not that the table will always remain exactly as it
is, but that none of the existing values would be arbitrarily changed.

Assume that it might be more complex than "Truck", "Rail", "Ship", and
"Air" -- perhaps there might be several entries for truck shipment via
different companies. If all the shipments via "RoadHog Freight Lines" were
to be reassigned to "RedDirt Hauling Co" because RoadHog went bankrupt and
the two firms served the same region, it might be changed; if
"FasterFreight" qualified as a new trucking firm to be used, it might be
added. If "BentWings Air" went out of business, that number might be reused
for a different air carrier, or just left unused. It's all a matter of good
business judgement as to which changes would be appropriate -- that's the
reason that not just any user could be allowed to modify it.

If indeed it were only "Road", "Rail", "Ship", and "Air" and there wasn't
going to be a change until it became practical to ship via "Orbital Rocket",
you're right, there wouldn't be an advantage (generally speaking) to using a
table instead of hard coding the labels, unless the table had other uses as
well.

I suppose I could also imagine a "generic form" that could be adapted to
multiple uses by simply changing the tables that it used.

I rarely do that kind of thing, on the basis that "simpler is better" for
the kind of work I do (contract work that may have to be maintained by
someone else). It has surely cost some customers a lot of extra expense
because a developer got carried away and tried to make one "self-modifying"
object do when it would have been better to have several simpler ones, each
trivially simple to maintain. I have, I sadly report, been the person who
had to spend extra time to figure out a few complex self-modifying objects
before a simple change could be implemented.

Larry

"Phil Stanton" <ph**@stantonfamily.co.uk> wrote in message
news:3f*********************@mercury.nildram.net.. .
I feel very nervous at arguing with an expert such as yourself Larry, but if the table isn't going to be changed, why not write the label.Captions
directly

Phil
"Larry Linson" <bo*****@localhost.not> wrote in message
news:R3******************@nwrddc02.gnilink.net...
"Phil Stanton" wrote
> Sounds Dodgy. . . .
> and someone changes the table to Air,
> Road, Sea, Air, you will get the wrong
> answer.


That would be the Lookup Table for "Ship By" and it should not be

available
for just anyone to go in and change, willy-nilly.

In a developed application distributed to users, the users should have
neither direct access to the Table, nor to the Query Builder, nor to a

Form
to update that Table. It should also be declared with Referential

Integrity
and Cascading Update so that _valid_ updates to the key field by a

developer
would be carried forward to related tables (and a developer should know

that
you don't change the description of "Road" to "Air" in a lookup table --

if
not, then continuation of employment ought not be an option).

Larry Linson
Microsoft Access MVP


Nov 12 '05 #5
Well, I certainly stirred up a discussion with my question.

I don't want the end users to change the table. I have different
users who need different options available in the option group.

What I wind up doing is changing them directly and it's a real pain,
since some overlap others, etc.

I know it's messy, but I'm not a pro and the end users are happy with
it.

So, is it possible to have the option labels get their caption from a
table?
Also, is it possible to embed a font into a database or does each
machine need to have that font installed?
Thanks for any help,

Shyguy
Nov 12 '05 #6
Shyguy <Sh****@shytown.com> wrote in
news:mk********************************@4ax.com:
Well, I certainly stirred up a discussion with my question.

I don't want the end users to change the table. I have
different users who need different options available in the
option group.

What I wind up doing is changing them directly and it's a real
pain, since some overlap others, etc.

I know it's messy, but I'm not a pro and the end users are
happy with it.

So, is it possible to have the option labels get their
caption from a table?
You could get option labels from a table with a little bit of code
in the form's Open event. You would need the following fields in
the table: OptionGroup, labelname, labeltext, and some sort of ID
field to differentiate between the different user groups.

When the form opens, you need to establish which user group has
opened the form, then create a recordset filtered for the user
group, read each record and update the label's caption property.

It's probably more work than it's worth. Have you considered just
changing the label captions from code and storing the captions as
strings in the code?

something like:
select case usergroup
case usergroup = 1
me.label1.caption = "User 1 string 1"
me.label3.caption = "User 1 caption 2"
me.label5.caption = "User 1 text 3"
case usergroup = 2
me.label1.caption = "User 2 string 1"
me.label3.caption = "User 2 caption 2"
me.label5.caption = "user 2 something 999"
end select

Also, is it possible to embed a font into a database or does
each machine need to have that font installed?
AFAIK, you have to install the fonts.

Thanks for any help,

Shyguy


Nov 12 '05 #7
Thank you so much. Actually the code is even better for me.

Thnak you,

Shyguy
Nov 12 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Shock | last post: by
2 posts views Thread by qumpus | last post: by
5 posts views Thread by Adam Smith | last post: by
4 posts views Thread by Dinesh Jain | last post: by
9 posts views Thread by Bob Malcoprs | last post: by
reply views Thread by marcell71 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.