RE: Combo Box To Hide Tab Control

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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..
.



Relevant Pages

  • RE: Combo Box To Hide Tab Control
    ... second row as that is a very unstable way to get the same value each time. ... selecting as your condition. ... I suspect that this is not the case though. ... "Lowrider72" wrote: ...
    (microsoft.public.access.gettingstarted)
  • Re: Facebook
    ... If so you are a fitting "friend" in ... Lol!! ... Played a sexist detective in Prime Suspect or a working class hero! ... Oh well, sniff sniff, i'm not upset, sniff ...
    (uk.local.kent)
  • Re: Derek Fisher suspected ...
    ... I KNOW he poisoned my dog. ... lol... ... after reading this last post the only thing i suspect is you going down on him... ...
    (alt.sports.basketball.nba.la-lakers)
  • Re: All I can say is WOW on topic
    ... LOL! ... I suspect we're not the only ones. ... is happy to spend the money and since the parents of the girl are okay with ...
    (rec.crafts.textiles.quilting)
  • Re: Recommend me some trainers
    ... Pete M wrote: ... >>> I'm a Reebok classic man, but I suspect that won't be a shock to ... >> Lol. ...
    (uk.rec.cars.modifications)