Re: Use value of combo box column
From: Roger Carlson (NO-Rog3erc-SPAM_at_hotmail.com)
Date: 11/16/04
- Next message: Simon: "Re: Option Group with Case statement"
- Previous message: Roger Carlson: "Re: Don't want the record to be saved on form exit."
- In reply to: Snowsride: "Use value of combo box column"
- Next in thread: Snowsride: "Re: Use value of combo box column"
- Reply: Snowsride: "Re: Use value of combo box column"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 08:27:35 -0500
Combo box columns are indexed starting at zero, so the column numbers for a
3 column combo are 0, 1, 2. Try using 2.
BTW, the condition must be on the same line as the ElseIf:
ElseIf Me.MyCombo.Column(2)="C" then
-- --Roger Carlson Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L "Snowsride" <Snowsride@discussions.microsoft.com> wrote in message news:FA753C9B-2D4C-4AF3-8B81-8D8776BC13C6@microsoft.com... > I have a combo box with three columns. > > I want an If statement to execute on the value of the contents of column 3 > which contains text C or D. > > How can I do this? I've tried > > If Me.MyCombo.Column(3)="D" then > TakeSomeAction > Elseif > Me.MyCombo.Column(3)="C" then > DosomethingElse > end if > > Thanks > >
- Next message: Simon: "Re: Option Group with Case statement"
- Previous message: Roger Carlson: "Re: Don't want the record to be saved on form exit."
- In reply to: Snowsride: "Use value of combo box column"
- Next in thread: Snowsride: "Re: Use value of combo box column"
- Reply: Snowsride: "Re: Use value of combo box column"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|