I am programming a client service dbase in access 2000 for a
non-profit health clinic.
I want to create a navigation menu that can show varying numbers of
command buttons with varying captions, driven by data from a table.
1. First, the user selects a "client" by code. This opens a
navigation form which offers command buttons for each of the services
the client is enrolled in, e.g., nutrition, pre-natal care, drug
treatment, etc. There are 10 possible services, so there are ten
buttons, all invisible until a count of client services is established
(from a table, where each of the services has its own index). If the
client has 4 services, then buttons 1 through 4 become visible. So
far, so good. I am able to get that to work.
2. I would like each command button to have a caption that varies
depending on the services. Each time the listing the services is
generated, the records are numbered consecutively. So I would like to
use text control for each command button, where the control source is
a subquery to make something which says,
(SELECT tService.Service FROM tService WHERE
(((tsvcCount.counter)=1)));
(or counter = 2 or whatever....)
Each command button's caption would be driven by the text appearing in
this text control.
So far, I can get the text control to accept the syntax of the
subquery, but when I view the form, the text control just says #Name?
Am I trying the impossible? Is it possible to use a subquery in a
text control?
Gwindor