Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Is it possible to Hide a text box on a form depending on the selec

Discussion in 'Information Technology' started by Accessidiot, Jul 28, 2006.

  1. Accessidiot

    Accessidiot
    Expand Collapse
    Guest

    I have a form with multiple combo boxs, where the user selects one of five
    options, for three of the options the user then needs to enter information on
    another form. It would make the second form more user friendly if only the
    text boxs that were relevant were displayed and better still if they were
    grouped together to make the form look tidier. Any help?
    Thanks in advance.
     
  2. Loading...

    Similar Threads Forum Date
    Movies Ashdoc's movie review---Mission impossible 5 Rogue nation Theatre, Movies & Cinema Aug 12, 2015
    India Professor Bhullar's release possible after landmark SC judgement Breaking News Jan 21, 2014
    USA UPDATED! Dr. Prabjot Singh, Sikh Professor Attacked in Possible Hate Crime (2 Videos) Breaking News Sep 23, 2013
    A Shabad I came across - possible interpretations Sikh Sikhi Sikhism Aug 28, 2013
    To know God is to Love him, why this is not possible Sikh Sikhi Sikhism Mar 31, 2012

  3. bobocat

    bobocat
    Expand Collapse
    Guest

    I tried this before.
    Firstly, I set the text box, property-->Data--> Enable = no, then the text
    box becomes dim up.

    Secondly, setup the comob box, name it, e.g opt
    In the combo box, create an After Update event, build a macro with condition
    view
    assuming that your option in the combo box are "a", "b", "c", "d", "e"

    Condition:[opt]="c", action: SetValue, Item
    [Forms]![Formname]![textfieldname].[Enabled], expression = yes
    the other conditions, action: SetValue, Item
    [Forms]![Formname]![textfieldname].[Enabled], expression = no

    Bobocat

    "Accessidiot" <Accessidiot@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:9F6D7997-9354-4B1B-A7E3-8D0A8430900B@microsoft.com...
    >I have a form with multiple combo boxs, where the user selects one of five
    > options, for three of the options the user then needs to enter information
    > on
    > another form. It would make the second form more user friendly if only the
    > text boxs that were relevant were displayed and better still if they were
    > grouped together to make the form look tidier. Any help?
    > Thanks in advance.
     
  4. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    It's pretty difficult to offer any real help with the limited information
    that you have provided. However, you might want to look into opening your
    second form using the DoCmd.OpenForm method and supplying an optional OpenArg
    parameter. The second form can be made to respond accordingly based on the
    argument that you pass in.


    Tom Wickerath
    Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "Accessidiot" wrote:

    > I have a form with multiple combo boxs, where the user selects one of five
    > options, for three of the options the user then needs to enter information on
    > another form. It would make the second form more user friendly if only the
    > text boxs that were relevant were displayed and better still if they were
    > grouped together to make the form look tidier. Any help?
    > Thanks in advance.
     
  5. Rod Plastow

    Rod Plastow
    Expand Collapse
    Guest

    Hi,

    If I understand you have one form containing combo boxes and depending upon
    the selections made in these boxes you may wish to open another form and that
    second form may also differ in content and format from one choice to another.
    From your posting name I also conclude you do not have too much opinion of
    your Access skills - or are you being modest?

    Yes, it's possible to do what you want and there are numerous ways you can
    achieve it. Personally I would get behind the scenes and use VBA to
    manipulate my second form but I will avoid VBA as much as possible in this
    reply. Moreover unless circumstances dictated otherwise I would make that
    second form a sub form on the main form.

    OK, manipulating the properties of controls on a form is straightforward but
    I would advise against trying to move controls around. There are two
    simplistic approaches you can take. Either design a different form for each
    case and open the appropriate one depending upon the selection in the combo
    boxes or design one form with generalised text boxes and resolve the
    visibility, bindings and captions of each text box as it is loaded. In the
    second case consider using the OpenArgs property to instuct the second form
    as to what format it should take. You then need to put code behind the Load
    event.

    There are some logistic considerations too. What happens when the user is
    finished with the second form? Is it closed? (Hopefully it is or you will
    end up with unsychronised data being displayed.) When the second form is
    closed what happens to the first form, etc.? I assume also you need to
    synchronise the first and second forms with respect to one DB record or one
    query result set row - do you use the filter clause of the DoCmd OpenForm
    function?

    Hope this at least points you in the right direction. When you have decided
    on a few specifics I and others can be more specific in our responses.

    Regards,

    Rod


    "Accessidiot" wrote:

    > I have a form with multiple combo boxs, where the user selects one of five
    > options, for three of the options the user then needs to enter information on
    > another form. It would make the second form more user friendly if only the
    > text boxs that were relevant were displayed and better still if they were
    > grouped together to make the form look tidier. Any help?
    > Thanks in advance.
     
  6. Accessidiot

    Accessidiot
    Expand Collapse
    Guest

    RE: Is it possible to Hide a text box on a form depending on the s

    Rod you understand perfectly, and my access skills are limited although i
    have done some work with vba. I'll set off in the direction you say and see
    how i get on.
    Thanks
    ian

    "Rod Plastow" wrote:

    > Hi,
    >
    > If I understand you have one form containing combo boxes and depending upon
    > the selections made in these boxes you may wish to open another form and that
    > second form may also differ in content and format from one choice to another.
    > From your posting name I also conclude you do not have too much opinion of
    > your Access skills - or are you being modest?
    >
    > Yes, it's possible to do what you want and there are numerous ways you can
    > achieve it. Personally I would get behind the scenes and use VBA to
    > manipulate my second form but I will avoid VBA as much as possible in this
    > reply. Moreover unless circumstances dictated otherwise I would make that
    > second form a sub form on the main form.
    >
    > OK, manipulating the properties of controls on a form is straightforward but
    > I would advise against trying to move controls around. There are two
    > simplistic approaches you can take. Either design a different form for each
    > case and open the appropriate one depending upon the selection in the combo
    > boxes or design one form with generalised text boxes and resolve the
    > visibility, bindings and captions of each text box as it is loaded. In the
    > second case consider using the OpenArgs property to instuct the second form
    > as to what format it should take. You then need to put code behind the Load
    > event.
    >
    > There are some logistic considerations too. What happens when the user is
    > finished with the second form? Is it closed? (Hopefully it is or you will
    > end up with unsychronised data being displayed.) When the second form is
    > closed what happens to the first form, etc.? I assume also you need to
    > synchronise the first and second forms with respect to one DB record or one
    > query result set row - do you use the filter clause of the DoCmd OpenForm
    > function?
    >
    > Hope this at least points you in the right direction. When you have decided
    > on a few specifics I and others can be more specific in our responses.
    >
    > Regards,
    >
    > Rod
    >
    >
    > "Accessidiot" wrote:
    >
    > > I have a form with multiple combo boxs, where the user selects one of five
    > > options, for three of the options the user then needs to enter information on
    > > another form. It would make the second form more user friendly if only the
    > > text boxs that were relevant were displayed and better still if they were
    > > grouped together to make the form look tidier. Any help?
    > > Thanks in advance.
     
  7. Accessidiot

    Accessidiot
    Expand Collapse
    Guest

    Re: Is it possible to Hide a text box on a form depending on the s

    This also sounds a good method I'll try this one too thanks
    Ian

    "bobocat" wrote:

    > I tried this before.
    > Firstly, I set the text box, property-->Data--> Enable = no, then the text
    > box becomes dim up.
    >
    > Secondly, setup the comob box, name it, e.g opt
    > In the combo box, create an After Update event, build a macro with condition
    > view
    > assuming that your option in the combo box are "a", "b", "c", "d", "e"
    >
    > Condition:[opt]="c", action: SetValue, Item
    > [Forms]![Formname]![textfieldname].[Enabled], expression = yes
    > the other conditions, action: SetValue, Item
    > [Forms]![Formname]![textfieldname].[Enabled], expression = no
    >
    > Bobocat
    >
    > "Accessidiot" <Accessidiot@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:9F6D7997-9354-4B1B-A7E3-8D0A8430900B@microsoft.com...
    > >I have a form with multiple combo boxs, where the user selects one of five
    > > options, for three of the options the user then needs to enter information
    > > on
    > > another form. It would make the second form more user friendly if only the
    > > text boxs that were relevant were displayed and better still if they were
    > > grouped together to make the form look tidier. Any help?
    > > Thanks in advance.

    >
    >
    >
     

Share This Page