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  

Compare a control value and a List Box value



 
 
Thread Tools Display Modes
  #1  
Old October 29th, 2009, 01:47 AM posted to microsoft.public.access.forms
Silvio
external usenet poster
 
Posts: 140
Default Compare a control value and a List Box value

I need to check to see if the value from my control is also in the first
column of my list box. Something like: If me. MyControlvalue =
listBox.column(1) then do whatever...

How do I do this?
Thank you,
Silvio
  #2  
Old October 29th, 2009, 03:56 AM posted to microsoft.public.access.forms
Beetle
external usenet poster
 
Posts: 1,254
Default Compare a control value and a List Box value

If Me.SomeControl = Me.MyListBox.Column(1) Then
'some code here...
End If

Keep in mind however that the Column property of a
list box uses a zero based index, so the first column is actually
Column(0), the second is Column(1), etc.
--
_________

Sean Bailey


"Silvio" wrote:

I need to check to see if the value from my control is also in the first
column of my list box. Something like: If me. MyControlvalue =
listBox.column(1) then do whatever...

How do I do this?
Thank you,
Silvio

 




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 10:01 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.