Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Combo box

    There's more than one way of doing this, but I suggest
    using a query as the recordsouce of the subform. In the
    appropriate field enter a criteria of "Forms![FormName]!
    [ComboBoxName]"

    On the AfterUpdate event of the combo box put VBA similar
    to the following:
    Me.[SubformControlName].Form.requery
    >-----Original Message-----
    >Hello
    >
    >How do I use a combo box to filter data in a subform. The
    subform is base on
    >a table and not a query. The subform is also in a main
    form.
    >
    >Floyd
    >
    >
    >.
    >
    SimonM Guest

  2. Similar Questions and Discussions

    1. Combo Box help
      Hello All, I have a form with one combo box and several text fields. I am sending the variables to an ASP page to process. The text field...
    2. Combo box, add 2 together
      Right, ok, well I have designed a form that will display a price (22.34) in a text box, and another price in the other text box... I also have a...
    3. combo
      This occuring a strange fact, I select an item in combo but when I go to verify: ddlempCodigo.SelectedItem.Value the value is always of the first...
    4. Web Combo Box
      hi, has anyone come across a web combobox, which manipulates the dataset rather than query the database everytime, to shorten the resulting...
    5. populate combo in asp
      Can someone please tell me what they think is wrong with this code to populate a combo : <select name="select"> <% While ((Repeat1__numRows <>...
  3. #2

    Default Combo Box

    Me again! I have a combo box that is displayed in my form
    that provides a list of DVD, VHS, or N/A and you have to
    select one. My problem is that it automatically defaults
    to DVD and if I click on another field in my form it
    causes the other field to go blank even if I save it. Why
    won't it keep the choice picked and why does it go back to
    being blank when advancing to another field?

    Phyllis

    Phyllis Guest

  4. #3

    Default Re: Combo Box

    On Tue, 1 Jul 2003 11:51:15 -0700, "Phyllis" <pkatcher@sympatico.ca>
    wrote:
    >Me again! I have a combo box that is displayed in my form
    >that provides a list of DVD, VHS, or N/A and you have to
    >select one. My problem is that it automatically defaults
    >to DVD and if I click on another field in my form it
    >causes the other field to go blank even if I save it. Why
    >won't it keep the choice picked and why does it go back to
    >being blank when advancing to another field?
    What are the Recordsource and Rowsource properties of the combo box?
    Which "other field" goes blank? What is its Control Source?

    John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
    [url]http://go.compuserve.com/msdevapps?loc=us&access=public[/url]
    John Vinson Guest

  5. #4

    Default Re: Combo Box

    On Sun, 13 Jul 2003 11:48:18 GMT, "Erik Gjertsen" <erik@gjertsen.as>
    wrote:
    >That I wish to do is when I click on the close baton, it shall
    >automatically update the combo so I don't need to close the form and open
    >the form again so I can se the last update.
    Requery the combo box in the Click event of the close button:

    Forms!bookform!comboboxname.Requery

    John W. Vinson[MVP]
    Come for live chats every Tuesday and Thursday
    [url]http://go.compuserve.com/msdevapps?loc=us&access=public[/url]
    John Vinson Guest

  6. #5

    Default COMBO BOX

    Hi

    I have a form with a combo box that goes to a specific record.

    What I want to do is when a filter is applied to the form the combo box only
    displays the filtered selection.

    the SQL code for the combo box is
    SELECT DISTINCTROW [suppliers phone].id, [suppliers phone].Company,
    [suppliers phone].Buyer
    FROM [suppliers phone]
    ORDER BY [suppliers phone].Company;
    I,m quite new to Access but "supplier phone" is the table name should I be
    pointing my combo box to the form.

    Cheers




    Ron Bentley Guest

  7. #6

    Default combo box

    I have two questions.
    I want to insert on a form a combo box. I need the source
    to this combo box to be a field A from table A and field
    B form table B.
    Example:
    I have a table for suppliers and one for clients, both
    with a filed called name. I want the combo box to list
    the name of all clients and suppliers. I can't do this.
    Is it possible?

    Another question.
    The field name in my supplier table is the primary key.
    When I open the supplier form it is sorted by the primary
    key. I want it to be sorted by another field. I can't do
    this. Is it possible?


    Raul Sousa Guest

  8. #7

    Default Re: combo box

    Raul
    See comments interspersed below....
    --
    Fred

    Please reply only to this newsgroup.
    I do not reply to personal e-mail.


    "Raul Sousa" <raulsousa@hotmail.com> wrote in message
    news:042701c3542d$bb0da140$a101280a@phx.gbl...
    > I have two questions.
    > I want to insert on a form a combo box. I need the source
    > to this combo box to be a field A from table A and field
    > B form table B.
    > Example:
    > I have a table for suppliers and one for clients, both
    > with a filed called name. I want the combo box to list
    > the name of all clients and suppliers. I can't do this.
    > Is it possible?
    Yes it is possible. Make a query.
    Place the combo box on the form.
    Click on the Combo Box's RowSource property line.
    Click on the button with 3 dots that will appear.
    When the Query window opens, add the 2 tables to the upper secton.

    Since any client can have more than one supplier, and
    any client can have more than one order,
    also add the table in which both tables are brought together,
    i.e. the OrderDetails table.
    Make sure the relationship joins between the 3 tables are correct.
    Drag the wanted fields from TableA and TableB onto the lower grid.

    On the SORT row, write 'ascending' onto whichever row you wish to sort by.

    Next change the resulting SQL statement
    (click on the View toolbutton and select SQL)
    from
    Select
    to
    Select Distinct

    Save the changes. That should be all you need do.

    NOTER. If you have fields named 'Name' you should change them to something
    else, i.e. 'SupplierName', 'ClientName'.
    Name is an Access reserved word and should not be used as a field name.
    From Access Help files:

    Guidlines for naming fields, controls, and objects
    ** snipped **

    When you name a field, control, or object, it's a good idea to make sure the
    name doesn't duplicate the name of a property or other element used by
    Microsoft Access; otherwise, your database can produce unexpected behavior
    in some circumstances. For example, if you refer to the value of a field
    called Name in a table NameInfo using the syntax NameInfo.Name, Microsoft
    Access displays the value of the table's Name property rather than the value
    of the Name field.

    * snipped **
    >
    > Another question.
    > The field name in my supplier table is the primary key.
    > When I open the supplier form it is sorted by the primary
    > key. I want it to be sorted by another field. I can't do
    > this. Is it possible?
    >
    >
    Open the form.
    Highlight the field you wish to sort by.
    Click on the Sort A-Z toolbutton.





    Fredg Guest

  9. #8

    Default Re: combo box

    Yes, both are POSSIBLE.

    First question:
    You will need to use a union query to get the information from both tables.
    You cannot build a union query using the query grid, but must type it in. Your
    query would look something like:
    SELECT FieldA FROM TableA
    UNION
    SELECT FieldB FROM TableB

    The problem I see is that when you select something in this combo based on this
    query, you won't know which table supplied the value. Obviously, you may need
    to supply more details.

    Second Question:
    You need to sort the underlying query. If you are basing the form on a table,
    then you need to change to a query based on that table.

    Raul Sousa wrote:
    >
    > I have two questions.
    > I want to insert on a form a combo box. I need the source
    > to this combo box to be a field A from table A and field
    > B form table B.
    > Example:
    > I have a table for suppliers and one for clients, both
    > with a filed called name. I want the combo box to list
    > the name of all clients and suppliers. I can't do this.
    > Is it possible?
    >
    > Another question.
    > The field name in my supplier table is the primary key.
    > When I open the supplier form it is sorted by the primary
    > key. I want it to be sorted by another field. I can't do
    > this. Is it possible?
    >
    John Spencer (MVP) Guest

  10. #9

    Default combo box

    Hi -
    What is the limit for entries in a combo-box? I have about 70
    interactive quizes, loaded via XML - Frame 1 allows the user to select
    a quiz via the combo box? Is there a better alternative?

    TX
    Bluestone Guest

  11. #10

    Default Combo Box

    Hi, does the V2 combo box have the iconFunction? The component imports list
    class's and so in theory it should but i cant get it working.

    below is the sorta code i go with but even if i put a specific value in the
    return of the iconFunction like return "clip1"; it still dosent work :( can
    anyone help me :) ty


    cb.addItem({label:"a",icon:"clip1"});
    cb.addItem({label:"b",icon:"clip2"});
    cb.addItem({label:"c",icon:"clip3"});
    cb.addItem({label:"d",icon:"clip4"});

    cb.iconFunction = function (item){
    return item.icon;
    }

    dazlee Guest

  12. #11

    Default Combo box

    I have many dynamically populated combo boxes.

    Presently I am using something like this (in a function) to get the value of
    the selectedItem in the combobox
    [Q]filtername = event.currentTarget.selectedItem.departmentname;[/Q]

    I pass along another parameter at the same time which I use in a switch
    statement. like so
    so I know what the labelfield is, in this case departmentname.
    [Q]
    case "filterjob":
    var filtername:String = event.currentTarget.selectedItem.departmentname;
    [/Q]

    Is there no way to just pass the value of the selectedItem so I can omit the
    switch statement? or how else would I do this?
    I am using HTTPService to send to PHP
    Thanks

    whiterrabbit Guest

  13. #12

    Default Re: Combo box

    hey.. try this..

    e.currentTarget.selectedLabel;

    or

    e.currentTarget.text.toString();

    this ll definitely work..
    jdjivani Guest

  14. #13

    Default Re: Combo box

    :grin;
    Works!
    Thanks!
    whiterrabbit Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139