Welcome to SPN

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

Sign Up Now!

Multiple Combo Boxes - Got 2 out of 3 working

Discussion in 'Information Technology' started by visionstate@googlemail.com, Jul 28, 2006.

  1. visionstate@googlemail.com

    visionstate@googlemail.com
    Expand Collapse
    Guest

    Hi there,
    I am working on a form that uses 3 text boxes and 3 combo boxes.
    When any data is entered into any of these, I click a command button
    and this requeries a sub query in the form and displays data dependent
    on what has been typed in.
    After having trouble with populating my second combo box (I eventually
    populated it by putting the fields for both combo boxes in 1 separate
    query) I am now having problems with the 3rd one and am literally
    tearing my hair out!!
    I have set it up exactly the same as the others. This is in the 'Row
    Source' row:
    SELECT DISTINCT [Dept Combo Query].Attending or Facilitating FROM [Dept

    Combo Query];

    I have a Query called 'Dept Combo Query' which contains 2 fields - one
    for each of the other combo boxes - and then a 3rd field called
    'Attending or Facilitating'.
    The query has no criteria at all in it.
    When I run my form and click the 3rd combo box I get a prompt coming up

    asking for 'Parameter Value'. If I am correct, I believe this should
    only be displayed if you have criteria in the query? If I click
    'Cancel' then I can use the combo box as normal but there are no values

    displayed.
    I have tried moving the field to a query all by itself and it still
    prompts for the Parameter Value.
    Any ideas on how I can stop this popup and populate the combo box??
    Any help is gratefully recieved!
    R.
     
  2. Loading...


  3. visionstate@googlemail.com

    visionstate@googlemail.com
    Expand Collapse
    Guest

    Hi again,
    After 4 hours of trying I've managed to solve this!
    It didn't like the fact that the field was called 'Attending or
    Facilitating'. I changed the field name in the table to 'Attending' and
    it worked.
    So simple yet so frustrating!!

    R.
     
  4. xRoachx

    xRoachx
    Expand Collapse
    Guest

    Hi -- Any time you have a table, query, report, or field name with spaces you
    need to include brackets around the name when referencing it in code:
    [Attending or
    Facilitating]

    Also, I recommend looking up standard naming conventions as this will assist
    you as your DBs and code become more complex.

    "visionstate@googlemail.com" wrote:

    > Hi again,
    > After 4 hours of trying I've managed to solve this!
    > It didn't like the fact that the field was called 'Attending or
    > Facilitating'. I changed the field name in the table to 'Attending' and
    > it worked.
    > So simple yet so frustrating!!
    >
    > R.
    >
    >
     
  5. BruceM

    BruceM
    Expand Collapse
    Guest

    I believe that when the field contains spaces, the field name needs to be
    within brackets:
    SELECT DISTINCT [Dept Combo Query].[Attending or Facilitating] FROM ...

    It is a good idea to avoid spaces in any names. If a space is needed, fill
    it with an underscore. It will save you from some headaches. The third
    commandment at the MVP site addresses this:
    http://www.mvps.org/access/tencommandments.htm

    <visionstate@googlemail.com> wrote in message
    news:1147360335.503923.183220@i39g2000cwa.googlegroups.com...
    > Hi again,
    > After 4 hours of trying I've managed to solve this!
    > It didn't like the fact that the field was called 'Attending or
    > Facilitating'. I changed the field name in the table to 'Attending' and
    > it worked.
    > So simple yet so frustrating!!
    >
    > R.
    >
     

Share This Page