Connecting Tech Pros Worldwide Help | Site Map

Buttons and Listboxes

  #1  
Old November 13th, 2005, 08:17 AM
DS
Guest
 
Posts: n/a
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
  #2  
Old November 13th, 2005, 08:17 AM
mik18@pitt.edu
Guest
 
Posts: n/a

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

  #3  
Old November 13th, 2005, 08:17 AM
DS
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed with moving items between two listboxes JodiPhillips answers 3 December 11th, 2008 11:13 PM
Using values in non-databound listboxes Scott McNair answers 3 February 7th, 2008 06:05 AM
mp3 player with 3 listboxes and category/subcategory waterox answers 2 June 26th, 2007 09:33 PM
Using Listboxes to enable multi-select Susan Bricker answers 9 November 13th, 2005 01:27 PM