Welcome to SPN

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

Sign Up Now!

Enter infor last

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

Tags:
  1. JOM

    JOM
    Expand Collapse
    Guest

    I have a combobox field on my form that I would like users to select last.So
    they have to enter other information first like name address etc and this
    combobox should be the last thing that they select. How do I do that?
     
  2. Loading...


  3. Tom Ellison

    Tom Ellison
    Expand Collapse
    Guest

    Dear JOM:

    There would be several options. The differences are stylistic.

    1. The combo box could be Visible = False until the controls that must have
    values are all set. Each of them could call a single subroutine in its Lost
    Focus event procedure, and this subroutine could check whether all the
    necessary controls are ready.

    2. You could set up a tab order so users following it arrive at this combo
    box after visiting all the required controls first.

    3. You could set the click event of the combo box to give a warning, or the
    Got Focus event.

    You could arrange a combination of these.

    There are many variable factors that affect which style would seem most
    appropriate, and these are not the only possible choices.

    Tom Ellison


    "JOM" <JOM@discussions.microsoft.com> wrote in message
    news:C514A636-B7FA-424A-BE97-5725A8D2AF93@microsoft.com...
    >I have a combobox field on my form that I would like users to select
    >last.So
    > they have to enter other information first like name address etc and this
    > combobox should be the last thing that they select. How do I do that?
     
  4. JOM

    JOM
    Expand Collapse
    Guest

    I would like to try the first option, how will I call the subroutines..

    "Tom Ellison" wrote:

    > Dear JOM:
    >
    > There would be several options. The differences are stylistic.
    >
    > 1. The combo box could be Visible = False until the controls that must have
    > values are all set. Each of them could call a single subroutine in its Lost
    > Focus event procedure, and this subroutine could check whether all the
    > necessary controls are ready.
    >
    > 2. You could set up a tab order so users following it arrive at this combo
    > box after visiting all the required controls first.
    >
    > 3. You could set the click event of the combo box to give a warning, or the
    > Got Focus event.
    >
    > You could arrange a combination of these.
    >
    > There are many variable factors that affect which style would seem most
    > appropriate, and these are not the only possible choices.
    >
    > Tom Ellison
    >
    >
    > "JOM" <JOM@discussions.microsoft.com> wrote in message
    > news:C514A636-B7FA-424A-BE97-5725A8D2AF93@microsoft.com...
    > >I have a combobox field on my form that I would like users to select
    > >last.So
    > > they have to enter other information first like name address etc and this
    > > combobox should be the last thing that they select. How do I do that?

    >
    >
    >
     
  5. Tom Ellison

    Tom Ellison
    Expand Collapse
    Guest

    Dear JOM:

    Make the subroutine calls in the exit events of the controls that must be
    set before the combo box appears.

    Tom Ellison


    "JOM" <JOM@discussions.microsoft.com> wrote in message
    news:59168884-6182-4A8F-B75C-679887E912B7@microsoft.com...
    >I would like to try the first option, how will I call the subroutines..
    >
    > "Tom Ellison" wrote:
    >
    >> Dear JOM:
    >>
    >> There would be several options. The differences are stylistic.
    >>
    >> 1. The combo box could be Visible = False until the controls that must
    >> have
    >> values are all set. Each of them could call a single subroutine in its
    >> Lost
    >> Focus event procedure, and this subroutine could check whether all the
    >> necessary controls are ready.
    >>
    >> 2. You could set up a tab order so users following it arrive at this
    >> combo
    >> box after visiting all the required controls first.
    >>
    >> 3. You could set the click event of the combo box to give a warning, or
    >> the
    >> Got Focus event.
    >>
    >> You could arrange a combination of these.
    >>
    >> There are many variable factors that affect which style would seem most
    >> appropriate, and these are not the only possible choices.
    >>
    >> Tom Ellison
    >>
    >>
    >> "JOM" <JOM@discussions.microsoft.com> wrote in message
    >> news:C514A636-B7FA-424A-BE97-5725A8D2AF93@microsoft.com...
    >> >I have a combobox field on my form that I would like users to select
    >> >last.So
    >> > they have to enter other information first like name address etc and
    >> > this
    >> > combobox should be the last thing that they select. How do I do that?

    >>
    >>
    >>
     
  6. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Not simple
    1) set the combobox to Not enabled/visible in the CurrentEvent procedure
    set the tag property of all dependent controls to "Required "
    in the after_update event of those controls add the code

    sub<controlAfterupdate>
    EnableCombo
    End sub

    ' Add this code to your forms module
    Private Sub EnableCombo
    Dim b as Boolean
    Dim C As Access.Controls
    For Each C In me.Controls
    If Typeof(C) is Access.TextBox Then ' add controltypes as required
    If c.Tag = "Required" And VBA.IsNull(C) then
    b = true
    exit for 'no need to check the rest
    end if
    end if
    next
    me!<combobox >.enabled= not b
    end sub

    substitute visible for enabled at your convenience

    hth

    Pieter

    "JOM" <JOM@discussions.microsoft.com> wrote in message
    news:C514A636-B7FA-424A-BE97-5725A8D2AF93@microsoft.com...
    >I have a combobox field on my form that I would like users to select
    >last.So
    > they have to enter other information first like name address etc and this
    > combobox should be the last thing that they select. How do I do that?
     

Share This Page