How to display the results from two list boxes

  • Thread starter Thread starter Will Sellers
  • Start date Start date
W

Will Sellers

I have two list boxes , Date and time period.
When a user clicks on a value in each box I want to show the results on the
form .
ex: You have selected [ DATE ] for [time period].
 
I have two list boxes , Date and time period.
When a user clicks on a value in each box I want to show the results on the
form .
ex: You have selected [ DATE ] for [time period].

You refer to a listbox like this:

Me.YourListboxName.Column(0)

Note that Columns are zero-based, so the first column is 0, second is 1, etc.

If you want a MsgBox with that text, you'd do this:

MsgBox "You have selected " & Me.YourDateListbox.Column(0) & " for " & Me.YourTimeListbox.Column(0)

Again, you might need to change the Column number to match those of your product ...

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Ok I understand the listbox code but I don't want to create a msg box
I just want to display this information underneath the selection criteria.

Scott McDaniel said:
I have two list boxes , Date and time period.
When a user clicks on a value in each box I want to show the results on
the
form .
ex: You have selected [ DATE ] for [time period].

You refer to a listbox like this:

Me.YourListboxName.Column(0)

Note that Columns are zero-based, so the first column is 0, second is 1,
etc.

If you want a MsgBox with that text, you'd do this:

MsgBox "You have selected " & Me.YourDateListbox.Column(0) & " for " &
Me.YourTimeListbox.Column(0)

Again, you might need to change the Column number to match those of your
product ...

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Back
Top