View Full Version : DLOOKUP


s.booth
03-18-2002, 06:03 AM
I want to be able to change the caption on a command button to a text value from a table. My database has several command buttons, each one representing a technician in a work shop. All their names are stored in a table. I would like to look up their names and change the caption on the command buttons to the value that is looked up.

Chris RR
03-18-2002, 07:40 AM
Hmmm...but what if you an additional technician? Or fire one and don't replace her? You'd have to redo your form. Usually, this would not be done with buttons, because of the maintenance headaches.

But, if you insist, one idea is to not use command buttons at all, but make nice little boxes (they could be exactly the same color as command buttons) and then group them with a line of text (that could be exactly the same font and size as your command button text). Align these and group these and put your button action into the "on click" of the box.

Then, I'd say you'll need some code in the On Open event of your form, to read the table with the technicians' names and change the text fields.

Fuga
03-18-2002, 08:05 AM
Iīm probaly way off base here, but;

Canīt you use a listbox for these things? Using control source to select record or to open a query-based form?

Thatīs what I would try, but then again, I often do things the wrong way. ;-)

Fuga.