A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

LIST BOX



 
 
Thread Tools Display Modes
  #1  
Old May 3rd, 2010, 12:45 PM posted to microsoft.public.access.forms
ashraf_al_ani via AccessMonster.com
external usenet poster
 
Posts: 14
Default LIST BOX

Dear All
I have a list box that previhe listews valuse 1,4,5,6...

is there a way to apply a condition to this list by saying
if one value of the list box is 1 then do a condition??
or if the list has a value 4 then do another condition??


i mean i want to apply a conditions to the listbox according to its values

best regards

--
Message posted via http://www.accessmonster.com

  #2  
Old May 3rd, 2010, 01:12 PM posted to microsoft.public.access.forms
BruceM via AccessMonster.com
external usenet poster
 
Posts: 448
Default LIST BOX

Select Case Me.ListBoxName
Case 1
' Do something
Case 4
' Do something else
Case 5
' Do another thing
etc.
End Select

However, this is not practical if there are many possible choices, in which
case it would depend in part on what you want to do, and the connection
between the list box values and that action.

By the way, "previhe listews valuse" is not meaningful.


ashraf_al_ani wrote:
Dear All
I have a list box that previhe listews valuse 1,4,5,6...

is there a way to apply a condition to this list by saying
if one value of the list box is 1 then do a condition??
or if the list has a value 4 then do another condition??

i mean i want to apply a conditions to the listbox according to its values

best regards


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

  #3  
Old May 3rd, 2010, 03:28 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default LIST BOX

Also note that Bruce's code would go in the Listbox AfterUpdate event.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.