Welcome to SPN

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

Sign Up Now!

Updating Query from Combo Box - PLEASE HELP!

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

  1. Kate

    Kate
    Expand Collapse
    Guest

    Hi

    I posted this question last week but no answers so am posting again to
    refresh in the hope that someone will be able to help me!! Am now desperate
    to have this sorted!!

    I've got a form which has companies, contacts and sales data in it. In the
    form header is a combo box where you can select the company you're interested
    in - all data for the form is then in relation to that company.

    I have combo box in the form which pulls together the four main contacts for
    that company (they are in 4 seperate fields and pulled together with a union
    query). I want a sales rep to then select the primary contact from this combo
    box. I have 2 problems:

    1) The combo box shows every single contact in the system - regardless of
    which company is selected in the combo header. I want this to only show
    contacts for the specific company
    2) I also want to build a query based on info input on this form and want
    the 'primary contact' to be pulled from this form and put next to the
    relevant company in the query.

    Apologies if this post is already on and please be gentle as am a complete
    novice!

    Many thanks
    Kate
     
  2. Loading...

    Similar Threads Forum Date
    Query about Jhatka Meat by Shooting in Head Sikh Sikhi Sikhism Aug 26, 2011
    Who is a sikh? A non sikh friend's query!! Sikh Sikhi Sikhism Apr 30, 2010
    General Query Hard Talk Sep 4, 2008
    Power of pauri's in Japji Sahib query Sikh Sikhi Sikhism Aug 17, 2006
    Sikhism a query Book Reviews & Editorials Aug 2, 2005

  3. fibre_SSP

    fibre_SSP
    Expand Collapse
    Guest

    I do things like that.

    The way I do it is to base the form on a query. The query filters the
    data by the value in the combo box. The criteria for the Customer in
    the query would be forms!formname.comboboxname. When you first open
    the form, it would be blank, because there is no value in the combo box
    unless you have a default value.

    In the afterupdate section of the combobox, I have a me!requery
    statement. This works pretty good for me.

    Kate wrote:
    > Hi
    >
    > I posted this question last week but no answers so am posting again to
    > refresh in the hope that someone will be able to help me!! Am now desperate
    > to have this sorted!!
    >
    > I've got a form which has companies, contacts and sales data in it. In the
    > form header is a combo box where you can select the company you're interested
    > in - all data for the form is then in relation to that company.
    >
    > I have combo box in the form which pulls together the four main contacts for
    > that company (they are in 4 seperate fields and pulled together with a union
    > query). I want a sales rep to then select the primary contact from this combo
    > box. I have 2 problems:
    >
    > 1) The combo box shows every single contact in the system - regardless of
    > which company is selected in the combo header. I want this to only show
    > contacts for the specific company
    > 2) I also want to build a query based on info input on this form and want
    > the 'primary contact' to be pulled from this form and put next to the
    > relevant company in the query.
    >
    > Apologies if this post is already on and please be gentle as am a complete
    > novice!
    >
    > Many thanks
    > Kate
     

Share This Page