Welcome to SPN

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

Sign Up Now!

Setting the focus

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

Tags:
  1. Economics

    Economics
    Expand Collapse
    Guest

    My form is composed of one combo box and multiple other text boxes all pulled
    from the same table. When i pick an item from my combo box the text boxes
    will all change to the corresponding records. The problem is that if i
    scroll down or up with my mouse the text records change but the record in my
    combo box remains unchanged. Is this a problem concerning focussing? Thank
    you to whoever can answer this for me.
     
  2. Loading...

    Similar Threads Forum Date
    General Great Production of English Songs and scene settings Videos Oct 11, 2012
    Hinduism Why is there Dancing in Bhajans or in Mandir Settings? Interfaith Dialogues Feb 18, 2011
    Personal Goal Setting. Why Set Goals? Business, Lifestyle & Leisure Oct 23, 2010
    Rise in Extremism or Rise in Hysteria? Canadian Sikhs Setting the Record Straight Hard Talk Apr 25, 2010
    Sikh News Badal invited to Pakistan for setting up of Nanak varsity (New Kerala) Breaking News Nov 23, 2009

  3. tina

    tina
    Expand Collapse
    Guest

    well, presumably the combo box control is unbound (the ControlSource
    property is blank), and has code running on its' AfterUpdate event to "find"
    the correct record on the form. the combo box is not actually connected to
    the data records at all, so if you want the selection in the combo box
    control to change as you move from record to record, you'll need to write
    code to do that. in the form's Current event procedure, you can add code to
    set the value of the combo box control; something along the lines of

    Me!ComboBoxControlName = Me!PrimaryKeyFieldName

    substitute the correct names, of course.

    hth


    "Economics" <Economics@discussions.microsoft.com> wrote in message
    news:C6173FAC-A1AF-4626-B7D3-45F8B2271B1C@microsoft.com...
    > My form is composed of one combo box and multiple other text boxes all

    pulled
    > from the same table. When i pick an item from my combo box the text boxes
    > will all change to the corresponding records. The problem is that if i
    > scroll down or up with my mouse the text records change but the record in

    my
    > combo box remains unchanged. Is this a problem concerning focussing?

    Thank
    > you to whoever can answer this for me.
     
  4. Economics

    Economics
    Expand Collapse
    Guest

    When i view the properties of the combo box it lists the name "Combo95", is
    this what i should use for my combo box control name, and what should i use
    for my primary key field name? Sorry if my questions seem a bit elementary.

    "tina" wrote:

    > well, presumably the combo box control is unbound (the ControlSource
    > property is blank), and has code running on its' AfterUpdate event to "find"
    > the correct record on the form. the combo box is not actually connected to
    > the data records at all, so if you want the selection in the combo box
    > control to change as you move from record to record, you'll need to write
    > code to do that. in the form's Current event procedure, you can add code to
    > set the value of the combo box control; something along the lines of
    >
    > Me!ComboBoxControlName = Me!PrimaryKeyFieldName
    >
    > substitute the correct names, of course.
    >
    > hth
    >
    >
    > "Economics" <Economics@discussions.microsoft.com> wrote in message
    > news:C6173FAC-A1AF-4626-B7D3-45F8B2271B1C@microsoft.com...
    > > My form is composed of one combo box and multiple other text boxes all

    > pulled
    > > from the same table. When i pick an item from my combo box the text boxes
    > > will all change to the corresponding records. The problem is that if i
    > > scroll down or up with my mouse the text records change but the record in

    > my
    > > combo box remains unchanged. Is this a problem concerning focussing?

    > Thank
    > > you to whoever can answer this for me.

    >
    >
    >
     
  5. tina

    tina
    Expand Collapse
    Guest

    "Economics" <Economics@discussions.microsoft.com> wrote in message
    news:02753015-9E8C-4CFB-9620-EB8FFEC1DA82@microsoft.com...
    > When i view the properties of the combo box it lists the name "Combo95",

    is
    > this what i should use for my combo box control name,


    yes.

    > and what should i use
    > for my primary key field name? Sorry if my questions seem a bit

    elementary.

    open the form in design view. click on the combo box control to select it.
    in the Properties box, click on the Event tab. look for a line that says
    [Event Procedure]
    it's probably on the AfterUpdate line. once you find it, click on the line
    and you'll see a Build button (...) at the right side. click that button.
    the VBA Editor window will open to the code for that event. highlight the
    *entire* procedure (it will start with "Private Sub" and end with "End
    Sub"). copy the procedure and paste it into a post so we can see it. from
    the posted code, i'll be able to tell you what fieldname to use.

    hth


    >
    > "tina" wrote:
    >
    > > well, presumably the combo box control is unbound (the ControlSource
    > > property is blank), and has code running on its' AfterUpdate event to

    "find"
    > > the correct record on the form. the combo box is not actually connected

    to
    > > the data records at all, so if you want the selection in the combo box
    > > control to change as you move from record to record, you'll need to

    write
    > > code to do that. in the form's Current event procedure, you can add code

    to
    > > set the value of the combo box control; something along the lines of
    > >
    > > Me!ComboBoxControlName = Me!PrimaryKeyFieldName
    > >
    > > substitute the correct names, of course.
    > >
    > > hth
    > >
    > >
    > > "Economics" <Economics@discussions.microsoft.com> wrote in message
    > > news:C6173FAC-A1AF-4626-B7D3-45F8B2271B1C@microsoft.com...
    > > > My form is composed of one combo box and multiple other text boxes all

    > > pulled
    > > > from the same table. When i pick an item from my combo box the text

    boxes
    > > > will all change to the corresponding records. The problem is that if

    i
    > > > scroll down or up with my mouse the text records change but the record

    in
    > > my
    > > > combo box remains unchanged. Is this a problem concerning focussing?

    > > Thank
    > > > you to whoever can answer this for me.

    > >
    > >
    > >
     

Share This Page