Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11

    Question Unanswered: I must be dumb or something...help!

    Dear All,

    Can someone please tell me how to pull a value for a parameter query.

    I have a form with Combobox 1. It is bound to Column 1

    I have a 2nd combobox that if fired from the first and involves a parameter for the underlying query. This parameter is the value from the 6th column in the query used to display combox 1

    How do I get the value of column 6 in the combobox 1 query to present it as the parameter for combobox 2 query.

    Cheers,

    Paul. :-)>

  2. #2
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61
    If you want to get column 6 from a combo box use

    Combobox1.column(5)

    Columns start counting from 0. So 6 is 5.

    Then you can put it in the rowsource of combobox2

    combobox2.rowsource="Select * from tbl where Field='" & combobox1.column(5) &"'"
    Last edited by DeathWing; 03-03-04 at 05:59.

  3. #3
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11
    Originally posted by DeathWing
    If you want to get column 6 from a combo box use

    Combobox1.column(5)

    Columns start counting from 0. So 6 is 5.

    Then you can put it in the rowsource of combobox2

    combobox2.rowsource="Select * from tbl where Field='" & combobox1.column(5) &"'"
    DeathWing,

    Thanks for the reply, I have done exactly that, but for some reason the value isn't appearing.

    There's obviously something wrong with my settings or my installation of Office because the dtabase has been doing the odd strange thing.

    Regards

    Paul.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Requery the combobox afterwards ...

  5. #5
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    11

    Question

    Done that also!

Posting Permissions

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