Connecting Tech Pros Worldwide Forums | Help | Site Map

Buttons and Listboxes

DS
Guest
 
Posts: n/a
#1: Nov 13 '05
I need to set up a number of buttons each having a different value to
them. I want to click on any given button and that in turn would
requery a listbox on a form according to that buttons value. How could
this be done.
Thanks
DS

mik18@pitt.edu
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Buttons and Listboxes


You can cast a value on the end of the button name and use that as the
parameter value for the requery. Let's say you have btn1 and btn2. When
btn1 is clicked you use the parameter value Right(btn1.Name,1) to a
function or sub routine. That way each button calls the same function
just passing a different parameter.

good luck.
mike

DS
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Buttons and Listboxes


mik18@pitt.edu wrote:[color=blue]
> You can cast a value on the end of the button name and use that as the
> parameter value for the requery. Let's say you have btn1 and btn2. When
> btn1 is clicked you use the parameter value Right(btn1.Name,1) to a
> function or sub routine. That way each button calls the same function
> just passing a different parameter.
>
> good luck.
> mike
>[/color]
Thanks I'll give it a try.
DS
Closed Thread