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 | | | | re: Need help with option group labels and embedding fonts..
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" <Shyguy@shytown.com> wrote in message
news:998uqv0qrut19a943s841f5bm8cn82jnta@4ax.com...[color=blue]
> 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[/color] | | | | re: Need help with option group labels and embedding fonts..
"Phil Stanton" wrote
[color=blue]
> Sounds Dodgy. . . .
> and someone changes the table to Air,
> Road, Sea, Air, you will get the wrong
> answer.[/color]
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 | | | | re: Need help with option group labels and embedding fonts..
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" <bouncer@localhost.not> wrote in message
news:R3Srb.32725$p9.25957@nwrddc02.gnilink.net...[color=blue]
> "Phil Stanton" wrote
>[color=green]
> > Sounds Dodgy. . . .
> > and someone changes the table to Air,
> > Road, Sea, Air, you will get the wrong
> > answer.[/color]
>
> That would be the Lookup Table for "Ship By" and it should not be[/color]
available[color=blue]
> 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[/color]
Form[color=blue]
> to update that Table. It should also be declared with Referential[/color]
Integrity[color=blue]
> and Cascading Update so that _valid_ updates to the key field by a[/color]
developer[color=blue]
> would be carried forward to related tables (and a developer should know[/color]
that[color=blue]
> you don't change the description of "Road" to "Air" in a lookup table --[/color]
if[color=blue]
> not, then continuation of employment ought not be an option).
>
> Larry Linson
> Microsoft Access MVP
>
>[/color] | | | | re: Need help with option group labels and embedding fonts..
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" <phil@stantonfamily.co.uk> wrote in message
news:3fb013fe$0$107$65c69314@mercury.nildram.net.. .[color=blue]
> I feel very nervous at arguing with an expert such as yourself Larry, but[/color]
if[color=blue]
> the table isn't going to be changed, why not write the label.Captions
> directly
>
> Phil
> "Larry Linson" <bouncer@localhost.not> wrote in message
> news:R3Srb.32725$p9.25957@nwrddc02.gnilink.net...[color=green]
> > "Phil Stanton" wrote
> >[color=darkred]
> > > Sounds Dodgy. . . .
> > > and someone changes the table to Air,
> > > Road, Sea, Air, you will get the wrong
> > > answer.[/color]
> >
> > That would be the Lookup Table for "Ship By" and it should not be[/color]
> available[color=green]
> > 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[/color]
> Form[color=green]
> > to update that Table. It should also be declared with Referential[/color]
> Integrity[color=green]
> > and Cascading Update so that _valid_ updates to the key field by a[/color]
> developer[color=green]
> > would be carried forward to related tables (and a developer should know[/color]
> that[color=green]
> > you don't change the description of "Road" to "Air" in a lookup table --[/color]
> if[color=green]
> > not, then continuation of employment ought not be an option).
> >
> > Larry Linson
> > Microsoft Access MVP
> >
> >[/color]
>
>[/color] | | | | re: Need help with option group labels and embedding fonts..
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 | | | | re: Need help with option group labels and embedding fonts..
Shyguy <Shyguy@shytown.com> wrote in
news:mk13rv835496uokk77a7i4jcfctmnm43um@4ax.com:
[color=blue]
> 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?
>[/color]
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
[color=blue]
>
> Also, is it possible to embed a font into a database or does
> each machine need to have that font installed?[/color]
AFAIK, you have to install the fonts.[color=blue]
>
>
> Thanks for any help,
>
> Shyguy
>[/color] | | | | re: Need help with option group labels and embedding fonts..
Thank you so much. Actually the code is even better for me.
Thnak you,
Shyguy |  | Similar Microsoft Access / VBA bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,510 network members.
|