RE: Combo Box To Hide Tab Control
- From: "Lowrider72" <Lowrider72@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 5 Apr 2005 12:03:04 -0700
Okay..we have some issues here lol
Firstly, yes "suspect" is what I want to use as my condition...I want to
generate codes for the other conditions...Anyway, I have entered the
following code in the after_update event of my combobox...
If Me.cboMyComboName.VALUE = "suspect" then
Me.MyTabControlName.Visible = True
End If
I have also set the visible property on the tab control to "no". I am also
using access 97 if that makes a difference....
And No, the code didn't work...Any more ideas?? lol
"kabaka" wrote:
> Is the second choice "suspect"?
>
> If so, and it is always the one you want to use as your condition, then your
> code is simply
>
> If Me.cboMyComboName.VALUE = "suspect" then
> Me.MyTabControlName.Visible = True
> End If
>
> However, if you always want to use the second row as your choice, then we've
> got a lot of work ahead of us. But I doubt this is the case.
>
> As I said earlier, you cannot just reference the second row like this. Even
> if you could it would be a bad idea. Rows within a table are not stored in
> any particular order. What would happen if the order came back differently
> next time?
>
> Let me know if that works.
>
> "Lowrider72" wrote:
>
> > OK..thanks for the help...The values in the combo box are "missing",
> > "suspect", "witness", and "victim"...I used 2 in the code to select the
> > second choice in the combo box which was "missing".
> >
> > Secondly, the unbound combo box is populated by a table (row source)...
> >
> > Hope this helps
> >
> > "kabaka" wrote:
> >
> > > Ok, then it'll be a little more complicated. First some questions:
> > >
> > > What are the values in the combo box? Is it actually a "2" that you are
> > > selecting or just the second row's value? You cannot just reference the
> > > second row as that is a very unstable way to get the same value each time.
> > > How are you populating the combo box? Value List or Table/Query?
> > >
> > > Value list: Then you can easily just type in the value that you are
> > > selecting as your condition. I suspect that this is not the case though.
> > >
> > > Table/Query: Post the Sql string that is used and *exactly* the value that
> > > you want as your condition.
> > >
> > >
> > >
> > > "Lowrider72" wrote:
> > >
> > > > Thanks for the help..I made the change but that still didn't work...I
> > > > inserted the code in the after_update of the combo box...Hopefuly that was
> > > > correct...I'm pulling my hair out over this one....Been looking for hours for
> > > > a solution on the net...useless!!
> > > >
> > > > "kabaka" wrote:
> > > >
> > > > > I think your if statement is wrong (you're missing the ".value" part)
> > > > >
> > > > > If Me.cboMyComboName.VALUE = 2 then
> > > > > Me.MyTabControlName.Visible = True
> > > > > End If
> > > > >
> > > > > "Lowrider72" wrote:
> > > > >
> > > > > > Hi everyone...I need some help...I have been trying to get a combo box to
> > > > > > unhide certain tab controls when selecting certain records...this is the code
> > > > > > that I have tried...
> > > > > >
> > > > > > If Me.cboMyComboName = 2 then
> > > > > > Me.MyTabControlName.Visible = True
> > > > > > End If
> > > > > >
> > > > > > Any help would be appreciated.
> > > > > >
> > > > > > Regards..
.
- Follow-Ups:
- RE: Combo Box To Hide Tab Control
- From: kabaka
- RE: Combo Box To Hide Tab Control
- References:
- Combo Box To Hide Tab Control
- From: Lowrider72
- RE: Combo Box To Hide Tab Control
- From: kabaka
- RE: Combo Box To Hide Tab Control
- From: Lowrider72
- RE: Combo Box To Hide Tab Control
- From: kabaka
- RE: Combo Box To Hide Tab Control
- From: Lowrider72
- RE: Combo Box To Hide Tab Control
- From: kabaka
- Combo Box To Hide Tab Control
- Prev by Date: RE: Combo Box To Hide Tab Control
- Next by Date: RE: Combo Box To Hide Tab Control
- Previous by thread: RE: Combo Box To Hide Tab Control
- Next by thread: RE: Combo Box To Hide Tab Control
- Index(es):
Relevant Pages
|