Results 1 to 13 of 13
  1. #1
    Join Date
    Jun 2004
    Posts
    4

    Unanswered: Combo box, conditional content

    I have a combo box that is populated by a query. Based on the value of another field onthe form, I want to use a different query to populate the combo box for selection,.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And your problem is???

    Suggestion: Build a SQL statement that you assign to the RowSource of the combobox and then do a requery ... Oh, and make sure that the column type match up ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Are you talking about assigning a different recordsource altogether, or just applying a filter based on that textbox value?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Jun 2004
    Posts
    4
    What I want to do is, if the value of fieldA is "A" I want the result of query "X" to be the selection in the combo box. If the value of fieldA is "B" I want the result of query "Y" to be the selection in the combo box.

    Query X is the entire table, Query Y is a sub set so it could be a filter.

    Forgot to mention I am a newbie with Access.

    Thanks...

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Izy was pointing you in the right direction then.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    Izy was pointing you in the right direction then.
    Izy??? He posted on this question??? Is it (the posting) invisible??? Boy, that guy is just everywhere ...
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    not only has your Grand Poobah status evaporated, but now folk don't even see when you post. tragic

    re GP: looks like all the old-style default tags got killed in the "upgrade". custom tags stayed.

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Quote Originally Posted by M Owen
    Izy??? He posted on this question??? Is it (the posting) invisible??? Boy, that guy is just everywhere ...
    Doh!

    Quiet you!!

    I haven't had my coffee today.

    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  9. #9
    Join Date
    Jun 2004
    Posts
    4
    I've tried making the Row source conditional and it didn't like that.

  10. #10
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Post the exact code you're using, the query, and what error you're receiving.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  11. #11
    Join Date
    Jun 2004
    Posts
    4
    This is the Row Source

    if(Parent![LOB]="MD" Reason_code_q else Reason_code_q_a)

  12. #12
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    iif()

    not

    if()
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  13. #13
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ...plus fix the missing commas and kill the else:
    iif(Parent![LOB]="MD", Reason_code_q, Reason_code_q_a)

    izy
    currently using SS 2008R2

Posting Permissions

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